Skip to content

Commit

Permalink
Merge pull request #15 from melgu/Fix-response-handling
Browse files Browse the repository at this point in the history
Fix email send response handling
  • Loading branch information
Andrewangeta authored Jun 26, 2023
2 parents 7186529 + 8d2ac20 commit 9619411
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/SendGridKit/SendGridClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public struct SendGridClient {
).get()

// If the request was accepted, simply return
guard response.status != .ok else { return }
guard response.status != .ok && response.status != .accepted else { return }

// JSONDecoder will handle empty body by throwing decoding error
let byteBuffer = response.body ?? ByteBuffer(.init())
Expand Down

0 comments on commit 9619411

Please sign in to comment.