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

runtime error trying to deserialise non json responses #480

Open
nunomaduro opened this issue Apr 9, 2020 · 0 comments
Open

runtime error trying to deserialise non json responses #480

nunomaduro opened this issue Apr 9, 2020 · 0 comments
Labels

Comments

@nunomaduro
Copy link

The Python API client throws a runtime exception while attempting to desialize a non json response. Note that, as described on the JavaScript API Client, we should NOT deserialise responses on those cases:

isTimedOut || isNetworkError(response) || (~~(status / 100) !== 2 && ~~(status / 100) !== 4)

Source: https://github.com/algolia/algoliasearch-client-javascript/blob/master/packages/transporter/src/concerns/retryDecision.ts#L12.

Solution: Create a pull request that ensures that no response.json() is performed on the cases mentioned above.

@nunomaduro nunomaduro added the Bug label Apr 9, 2020
@nunomaduro nunomaduro changed the title Runtime error trying to deserialise non json responses runtime error trying to deserialise non json responses Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant