Skip to content

Error handling for NS API is broken #73

@HippoProgrammer

Description

@HippoProgrammer

Line 50-55 of src/customio/ns.py:

                    self.rate_limited = True
                    raise HTTPResponseException(f'Error {response.status}: {response.reason}. NS API rate limited. No retry will be attempted.')
                    headers = response.headers
                    await asyncio.sleep(int(headers['Retry-After']))
                    self.rate_limited = False

Every line after the raise will not be executed even if the Exception is caught and handled. A migration to warnings should be considered.

Metadata

Metadata

Labels

bugSomething isn't workingenhancementNew feature or requestpythonPull requests that update python code

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions