Skip to content
This repository was archived by the owner on Aug 8, 2024. It is now read-only.

Conversation

@mintuz
Copy link
Contributor

@mintuz mintuz commented Sep 17, 2018

Hello again 👋 we've been using this library now for a couple of weeks now and noticed an issue when passing invalid json as the request object, causes an unexpected error to be thrown with the message unexpected token b in JSON

This PR is to fix that, this is done by stringifying the response.

@jzlai
Copy link

jzlai commented Sep 18, 2018

Hey, thanks again for the PR.

We were thinking that rather than just returning a string it might be better to return a real object, e.g. {error: 'ParseError', message: 'body is not a valid JSON'}.

What do you think?

@chgohlke
Copy link
Member

Good point. I will merge this PR and creates an new one. Thanks @mintuz

@chgohlke chgohlke merged commit 3d321b3 into spring-media:master Sep 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants