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

Catch all retrieval request failures into kgforge.core.commons.exception.RetrievalError #417

Open
ssssarah opened this issue Jul 8, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@ssssarah
Copy link
Contributor

ssssarah commented Jul 8, 2024

When a request is successful and a response is obtained, when the status code is not within a range (indicating a successful response), a kgforge.core.commons.exception.RetrievalError is raised.

However when the request is not successful (ex: doesn't reach server), another exception is thrown (ex: aiohttp.client_exceptions.ClientConnectorError) see https://bbpgitlab.epfl.ch/dke/apps/brain-modeling-ontology/-/jobs/1342198

Maybe this should be caught and raised as a RetrievalError as well.

This improvement can also generalize to all usage of aiohttp in forge (appropriate exceptions will be raised each time)

@ssssarah ssssarah added the enhancement New feature or request label Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant