neurobagel / api

https://api.neurobagel.org/
MIT License
4 stars 4 forks source link

Expand error catching for request to graph #303

Open alyssadai opened 5 months ago

alyssadai commented 5 months ago

(See related https://github.com/neurobagel/federation-api/pull/74 for reference)

The type of request error we're currently trying to catch is too narrow: https://github.com/neurobagel/api/blob/1f89c22bc37e462261c845cf975c90707681f3c7/app/api/crud.py#L52-L57

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.

github-actions[bot] commented 2 months ago

We want to keep our issues up to date and active. This issue hasn't seen any activity in the last 75 days. We have applied the _flag:stale label to indicate that this issue should be reviewed again. When you review, please reread the spec and then apply one of these three options: