Commit 62ccfd4 1 parent 9009a41 commit 62ccfd4 Copy full SHA for 62ccfd4
File tree 3 files changed +10
-4
lines changed
3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 1
1
# Change Log
2
2
3
+ ## 3.0.1 - 2020-4-3
4
+
5
+ ### Changes
6
+
7
+ - Validate error response body for empty string
8
+
3
9
## 3.0.0 - 2020-3-2
4
10
5
11
### Removed
8
14
9
15
## 2.6.0 - 2020-1-23
10
16
11
- ### Chages
17
+ ### Changes
12
18
13
19
- Dont send content types with dynamic templates (#69 )
14
20
15
21
## 2.5.0 - 2020-1-21
16
22
17
- ### Chages
23
+ ### Changes
18
24
19
25
- Add personalizations field (#60 )
20
26
Original file line number Diff line number Diff line change @@ -280,7 +280,7 @@ def perform_send_request(email)
280
280
result = client . mail . _ ( 'send' ) . post ( request_body : email . to_json ) # ლ(ಠ益ಠლ) that API
281
281
282
282
if result . status_code && result . status_code . start_with? ( '4' )
283
- message = !! ( result . body ) ? JSON . parse ( result . body ) . fetch ( 'errors' ) . pop . fetch ( 'message' ) : 'Sendgrid API Error'
283
+ message = !( result . body . empty? ) ? JSON . parse ( result . body ) . fetch ( 'errors' ) . pop . fetch ( 'message' ) : 'Sendgrid API Error'
284
284
full_message = "Sendgrid delivery failed with #{ result . status_code } #{ message } "
285
285
286
286
settings [ :raise_delivery_errors ] ? raise ( SendgridDeliveryError , full_message ) : warn ( full_message )
Original file line number Diff line number Diff line change 1
1
module SendGridActionMailer
2
- VERSION = '3.0.0 ' . freeze
2
+ VERSION = '3.0.1 ' . freeze
3
3
end
You can’t perform that action at this time.
0 commit comments