Skip to content
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

Improve SparkPost exceptions #163

Merged
merged 1 commit into from
Nov 22, 2024
Merged

Conversation

villermen
Copy link
Member

@villermen villermen commented Nov 18, 2024

When SparkPost melts and returns anything but a 2xx or 4xx status code, the library assumes it's a 5xx error without including any distinguishable error information. This PR changes it so the response status code is always set on the exception and the error message is included when available.

This is done to aid in debugging. If we wanted users to distinguish different error types, we should be mapping the responses to different codes or exceptions altogether.

@villermen villermen self-assigned this Nov 18, 2024
@villermen villermen marked this pull request as ready for review November 22, 2024 11:32
@villermen villermen merged commit 5572e3d into master Nov 22, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant