Skip to content

CLI returns 422 Unprocessable Entity #214

@masaccio

Description

@masaccio

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions