The send(email:) call always throws, even in the success case. This is because the API returns 202 accepted, not 200 ok in the success case.
This is why I've added a check against .accepted. To not break anything else, I've kept the check against .ok, but from my understanding it could be removed.
The
send(email:)
call always throws, even in the success case. This is because the API returns202 accepted
, not200 ok
in the success case.This is why I've added a check against
.accepted
. To not break anything else, I've kept the check against.ok
, but from my understanding it could be removed.