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

JSONDecodeError when calling tax_for_order #34

Open
exonjoe opened this issue Aug 31, 2022 · 0 comments
Open

JSONDecodeError when calling tax_for_order #34

exonjoe opened this issue Aug 31, 2022 · 0 comments

Comments

@exonjoe
Copy link

exonjoe commented Aug 31, 2022

There have been 2 brief occasions in the past week where we've received JSONDecodeErrors when calling the tax_for_order endpoint:

  File "taxjar/client.py", line 43, in tax_for_order
    return self.responder(request)
  File "taxjar/response.py", line 7, in from_request
    return TaxJarResponse().data_from_request(request)
  File "taxjar/response.py", line 10, in data_from_request
    response = request.json()
  File "requests/models.py", line 910, in json
    return complexjson.loads(self.text, **kwargs)
  File "json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Both occasions were very brief (under 45 seconds) so it's not been possible to reproduce the issue. It seems similar to #9. It could be that the API is returning non-JSON data in some situations.

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

No branches or pull requests

1 participant