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

feat!: parse json error response #67

Merged
merged 3 commits into from Jan 9, 2024

Conversation

boristomic
Copy link
Contributor

@boristomic boristomic commented Dec 4, 2023

resolves: #66

Signed-off-by: Boris Tomic 16724532+boristomic@users.noreply.github.com

BREAKING CHANGE: Error response is parsed as JSON if response headers
have content-type application/json and if it's possible to parse the
data as JSON. Otherwise response will be retuned as string or default
response will be returned as empty string.

Signed-off-by: Boris Tomic <16724532+boristomic@users.noreply.github.com>

BREAKING CHANGE: Error response is parsed as JSON if response headers
have content-type application/json and if it's possible to parse the
data as JSON. Otherwise response will be retuned as string or default
response will be returned as empty string.
src/wrapper.ts Show resolved Hide resolved
Signed-off-by: Boris Tomic <16724532+boristomic@users.noreply.github.com>
src/wrapper.ts Outdated Show resolved Hide resolved
@Valetudox Valetudox merged commit 4f4d8ae into emartech:master Jan 9, 2024
4 checks passed
@emarsys-deployer
Copy link

🎉 This PR is included in version 21.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error response should be json if response headers are set as application/json
5 participants