Skip to content
This repository has been archived by the owner on Jan 3, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants