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

Expand error catching for request to graph #303

Open
alyssadai opened this issue Apr 12, 2024 · 0 comments
Open

Expand error catching for request to graph #303

alyssadai opened this issue Apr 12, 2024 · 0 comments
Labels
maint:usability General improvements to product usability that are unrelated to feature prioritization. type:maintenance Upkeeping efforts & catch-up corrective improvements that are not Features nor Bugs

Comments

@alyssadai
Copy link
Contributor

alyssadai commented Apr 12, 2024

(See related neurobagel/federation-api#74 for reference)

The type of request error we're currently trying to catch is too narrow:

api/app/api/crud.py

Lines 52 to 57 in 1f89c22

except httpx.ConnectTimeout as exc:
raise HTTPException(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
detail="Timed out while connecting to the server. You may not be on an authorized network to perform this request.",
) from exc

any other type of timeout or error from the graph is not caught and results in an Internal server error. We may want to add a catch for a generic Exception and return any error message we get so API users get a more useful error. Basically, we want to minimize the dreaded Internal server error!!!!

We may also want to double check the error catching for requests related to other API endpoints, such as /attributes.

@alyssadai alyssadai added the flag:schedule Flag issue that should go on the roadmap or backlog. label Apr 12, 2024
@rmanaem rmanaem added type:maintenance Upkeeping efforts & catch-up corrective improvements that are not Features nor Bugs maint:usability General improvements to product usability that are unrelated to feature prioritization. and removed flag:schedule Flag issue that should go on the roadmap or backlog. labels Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maint:usability General improvements to product usability that are unrelated to feature prioritization. type:maintenance Upkeeping efforts & catch-up corrective improvements that are not Features nor Bugs
Projects
Status: No status
Development

No branches or pull requests

2 participants