-
Notifications
You must be signed in to change notification settings - Fork 86
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
Missing param raises an InvalidFormatter error? #34
Comments
|
Grape has error formatters and default handling. It feels like the default for JSON should return a JSON error. This would be much more convenient and logical IMO, there's no user out there who wants a 500 with an HTML page that gives you a call stack and an exception when you supply an invalid parameter for example. |
InvalidFormatter is just a poorly worded name I think. It says "the formatter is invalid", probably meant to say "the format is invalid"? |
So the only thing I should do is change name and printed message of the exception module? ** (Maru.Exceptions.InvalidFormat) :token is required. or ** (Maru.Exceptions.InvalidFormat) :age is illegal. |
I'll think more about how to handle it by default. |
Yes on the exception name it would be a start. I would namespace the parameter exceptions, maybe |
There's no |
A POST request to an API with
requires :token
yields this without a token:Seems like there're two problems.
The text was updated successfully, but these errors were encountered: