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

Transform API errors into 400 status code #48

Closed
dblock opened this issue Dec 19, 2015 · 0 comments
Closed

Transform API errors into 400 status code #48

dblock opened this issue Dec 19, 2015 · 0 comments

Comments

@dblock
Copy link
Owner

dblock commented Dec 19, 2015

Right now just throwing 500s.

2015-12-19T16:17:47.223437+00:00 heroku[router]: at=info method=POST path="/teams" host=pong.playplay.io request_id=cf76358c-a2db-4bac-a5c0-88cc92726d66 fwd="24.90.107.1" dyno=web.1 connect=0ms service=965ms status=500 bytes=154
2015-12-19T16:17:47.223893+00:00 app[web.1]:   Validation of Team failed.
2015-12-19T16:17:47.223885+00:00 app[web.1]: 2015-12-19 16:17:47 +0000: Rack app error: #<Mongoid::Errors::Validations: 
2015-12-19T16:17:47.223891+00:00 app[web.1]: message:
2015-12-19T16:17:47.223894+00:00 app[web.1]: summary:
2015-12-19T16:17:47.223894+00:00 app[web.1]:   The following errors were found: Token is already taken
2015-12-19T16:17:47.223895+00:00 app[web.1]: resolution:
2015-12-19T16:17:47.224315+00:00 app[web.1]: /app/vendor/bundle/ruby/2.2.0/gems/mongoid-5.0.1/lib/mongoid/persistable/creatable.rb:175:in `create!'
2015-12-19T16:17:47.224304+00:00 app[web.1]: /app/vendor/bundle/ruby/2.2.0/gems/mongoid-5.0.1/lib/mongoid/persistable.rb:78:in `fail_due_to_validation!'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant