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

CLI returns 422 Unprocessable Entity #214

Open
masaccio opened this issue Sep 14, 2024 · 0 comments
Open

CLI returns 422 Unprocessable Entity #214

masaccio opened this issue Sep 14, 2024 · 0 comments

Comments

@masaccio
Copy link

The CLI collects a token for me and then fails to use it.

The failure is a surepy.exceptions.SurePetcareError exception resulting from a 422 Unprocessable Entity:

CIMultiDictProxy('Date': 'Sat, 14 Sep 2024 09:30:43 GMT', 
'Content-Type': 'application/json; charset=utf-8',
 'Transfer-Encoding': 'chunked', 
'Connection': 'keep-alive', 
'Server': 'nginx', 
'Access-Control-Allow-Origin': '*', 
'Strict-Transport-Security': 'max-age=31536000; includeSubdomains; preload', 
'X-Frame-Options': 'DENY', 
'X-Content-Type-Options': 'nosniff', 
'X-XSS-Protection': '1; 
mode=block')

This results in a exception:

  File "/opt/homebrew/lib/python3.12/site-packages/surepy/client.py", line 225, in call
    self._auth_token = await self.get_token()
                       ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.12/site-packages/surepy/client.py", line 191, in get_token
    raise SurePetcareError()
surepy.exceptions.SurePetcareError
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