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

Raise errors on failed API calls #654

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

dunkOnIT
Copy link
Collaborator

Currently we haven't been checking for status code or raising errors when we don't get a 200 back from the monolith. This is a basic/non-comprehensive implementation of status codes for API endpoints that we call.

One thing I was wondering: If we get a 302/304 response, would that trigger a false-positive error message? Or is the server smart enough to still make it look like a 200?

@FinnIckler
Copy link
Member

I think httparty provides something like response.ok? To see if it is a 2xx or 3xx code

@FinnIckler
Copy link
Member

You can check the docs

@dunkOnIT
Copy link
Collaborator Author

@thewca-bot deploy staging

lib/competition_api.rb Outdated Show resolved Hide resolved
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.

3 participants