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

Invalid User Id giving 400 #211

Merged
merged 2 commits into from
Feb 24, 2022
Merged

Conversation

Hazelfire
Copy link
Contributor

@Hazelfire Hazelfire commented Feb 24, 2022

Currently, if the frontend passes an invalid user id (which sometimes happens in production), the backend will return a 500 error. This patches this problem, catching the error and returning it as a 400. I also have an rspec test that checks this.

This pull request does a number of things:

  • Creates a docker-compose file configured for both testing and development
  • Updates Ruby to 2.7.5
  • Adds a manifest file, required by newer versions of sprokets (although, it doesn't really need to do much considering it's a simple API)
  • Updates the factories to call their functions using {}, also required in newer versions of dependencies

Rspec does come back clean. And the app seems to work fine.

This fixes the server side problem of getguesstimate/guesstimate-app#1011. I'll see if I can hunt down the client side problem (why the client is sending invalid user ids in the first place)

@OAGr OAGr merged commit 2c9595f into getguesstimate:master Feb 24, 2022
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