You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, it seems to only return the first error found. So, e.g. API user gets an error, fixes the parameter, then gets an error on a different parameter. Rinse and repeat.
It would be useful to return multiple errors. To avoid the need for "rinse and repeat".
It begs the question, though, about "message" vs "errors". I'm not sure why they both exist in the first place? If it were to check and return errors for multiple parameters, what, logically, should "message be".
Multiple errors?
errors is an array, so there must have been some intent to return multiple errors. Is it just that that feature is not implemented, or am I doing something wrong?
The text was updated successfully, but these errors were encountered:
The default behaviour returns a 400 response as soon as a param validations fails. If you set :raise_sinatra_param_exceptions, true you can rescue individual exceptions and append all messages to a variable, but I'm afraid it's a bit more difficult than this.
Currently, it seems to only return the first error found. So, e.g. API user gets an error, fixes the parameter, then gets an error on a different parameter. Rinse and repeat.
It would be useful to return multiple errors. To avoid the need for "rinse and repeat".
It begs the question, though, about "message" vs "errors". I'm not sure why they both exist in the first place? If it were to check and return errors for multiple parameters, what, logically, should "message be".
Multiple errors
?errors is an array, so there must have been some intent to return multiple errors. Is it just that that feature is not implemented, or am I doing something wrong?
The text was updated successfully, but these errors were encountered: