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

In Requests, handle errors from Bibdata gracefully when building patron #4581

Open
maxkadel opened this issue Nov 18, 2024 · 0 comments
Open
Labels
bug The application does not work as expected because of a defect

Comments

@maxkadel
Copy link
Contributor

Expected behavior

When Requests cannot build a patron because Bibdata is returning an html error from the load balancer (perhaps 5XX errors?), the application should show a helpful message to the user, and fail gracefully.

Actual behavior

The application raises an error and probably just shows the generic "what went wrong" page.

Steps to replicate

  • Not sure - happened because when the Catalog was trying to build the patron, when it requested patron info from bibdata, it got the "Something went wrong" page from the load balancer instead, and was not caught by any of the rescues.

Impact of this bug

If a person is not able to create a request because Bibdata is down, they do not know why the request failed or what the current status is, or what their next steps might be.

Honeybadger link and code snippet, if applicable

https://app.honeybadger.io/projects/54399/faults/114615544/01JCWW9RV765NT1H0AVMEQ50F2

NoMethodError: undefined method `[]' for true:TrueClass patron_hash[:patron_group] ^^^^^^^^^^^^^^^
44 |  
-- | --
45 | def patron_group
46 | patron_hash[:patron_group]
47 | end

Implementation notes, if any

When the load balancer passes on an error, it is usually an html page, and may not raise any of the errors in the Bibdata service

@maxkadel maxkadel added the bug The application does not work as expected because of a defect label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The application does not work as expected because of a defect
Projects
None yet
Development

No branches or pull requests

1 participant