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
NoMethodError (undefined method `downcase' for 2:Fixnum)
An issue that response method tries to get an array values from @app_response, but it can't because @app_response stores Rack::Response instead of an array.
Don't know yet how to fix that issue, any suggestion can be helpful and transformed into a PR.
The text was updated successfully, but these errors were encountered:
@dmitry I don't totally understand what's going on, but it seems that Grape Middleware is trying to convert the @app_response object into a Rack::Response, but as you mentioned, @app_response is already a Rack::Response, so the error gets raised. To me, this seems like a problem on the Grape side, because I can't find anything that grape_logging is doing to futz with the @app_response value (that gets set from @app.call). So to get around it:
module Grape
module Middleware
class Base
def response
return @app_response if @app_response.is_a?(Rack::Response)
super
end
end
end
end
After upgrading I see:
NoMethodError (undefined method `downcase' for 2:Fixnum)
An issue that
response
method tries to get an array values from@app_response
, but it can't because@app_response
storesRack::Response
instead of an array.Don't know yet how to fix that issue, any suggestion can be helpful and transformed into a PR.
The text was updated successfully, but these errors were encountered: