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

Handle non-successful response from borrowdirect #1189

Merged
merged 1 commit into from
Dec 4, 2024
Merged

Conversation

corylown
Copy link
Contributor

@corylown corylown commented Dec 3, 2024

No description provided.

@@ -25,7 +27,10 @@ def get(path, **)
end

def get_json(path, **)
parse(get(path, **))
parse(check_response(get(path, **)))
rescue BorrowDirectError => e
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the client the right place to suppress this error, or should it be rescued at a higher level? (like, say,

?)

I guess I'm worried rescuing the errors this low in the stack could make it harder to debug problems.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. I moved the rescue up to BorrowDirectReshareRequests#reshare_requests.

@corylown corylown force-pushed the fix-borrow-direct branch 2 times, most recently from ceea129 to 43a8c2f Compare December 4, 2024 14:25
@cbeer cbeer merged commit ffc1736 into main Dec 4, 2024
3 checks passed
@cbeer cbeer deleted the fix-borrow-direct branch December 4, 2024 15:13
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.

2 participants