New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when SG returns error, library happily returns success #50
Comments
Did a quick check and SG does return 400. I think it would make sense to check if response anything else than 200 and return an error instead. |
Let me know how you want to approach this and I might provide a PR. |
Hey, Kane. I didn't do any status checking so I would be happy to integrate that in. |
@gsquire main question do we return response text verbatim or try to decode json? |
Perhaps we can make a new error type for unsuccessful responses and return that? So you could parse the JSON and return the actual status. |
Hey @gsquire, I've tried to send message and it returned Ok with the following error:
I wonder if SG returns successful status code in this case?
The text was updated successfully, but these errors were encountered: