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

Add try except around client queries #7626

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

samaloney
Copy link
Contributor

@samaloney samaloney commented May 14, 2024

PR Description

Make Fido.search more robust by wrapping the client.search calls in a try except. Current code works but introduces silent fails I will add some logging. Need a way to surface the errors to the user in the search results maybe add a ClientError that could be include in the result or add and .error similarly to the Fido.fetch

  • Add .errors to the UnifiedResponse
  • Reduce log clutter

Closes #7625

@Cadair
Copy link
Member

Cadair commented May 15, 2024

I am + on adding a .error[s] to UnifiedResponse as well. I worry the full log.exception might be too much if we do that though, people are likely to think it's all broken even if it isn't.

@samaloney
Copy link
Contributor Author

Ok I'll have a look at adding a .errors to the UnifiedResponse. Do the logs even show up with the defaults? I could replace the current log with a small message at info/warning and keep the track trace at debug?

@Cadair
Copy link
Member

Cadair commented May 15, 2024

I think everything info and above shows up by default.

@samaloney
Copy link
Contributor Author

samaloney commented May 16, 2024

Ok I've added a comment to the issue to discuss how the API could/should look before I go to far with an implementation - #7625 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make Fido.search robust against errors from a single client/s
2 participants