BlueBrain / BlueBrain/nexus-forge

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

Open
#417 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
52
Forks
21
PR merge metrics
No merged PRs in 30d

Description

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)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.