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
When using parameter validations and submitting a request with invalid params, I've lost the context in which those headers were set. This causes swagger-ui to not be able to render the response.
rescue_fromGrape::Exceptions::ValidationErrorsdo |e|
# Headers not available hereerror!('my custom error message',400)end
I'm going to put in a pull request to add the headers to Grape::Exceptions::ValidationExceptions class so that I can do this
I'm using grape with grape-swagger and swagger-ui and for swagger-ui to work I need to set header values like so:
When using parameter validations and submitting a request with invalid params, I've lost the context in which those headers were set. This causes swagger-ui to not be able to render the response.
I'm going to put in a pull request to add the headers to Grape::Exceptions::ValidationExceptions class so that I can do this
The text was updated successfully, but these errors were encountered: