-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
NoMethodError in after callback inside Grape::Middleware::Formatter #2139
Comments
@Bilal-Abbas-Gigalabs which version of Grape and Rack do you use? |
|
I think this is because your method returns the stream somehow. Noticing that ... # your code that does something to Stream
status 200
{ 'message': 'successfully created the stream request' } |
Still getting the same error on above update !!! |
Post the full stack please? |
|
I don't know how your Does the API return a result successfully without any of the I think you'll have to put up something that reproduces the problem from here for us to help. |
That is my end point
Follwoing are my helpers
and one model method
I ran each an every line of code in debugging and it did not gave me this error |
I am just creating the stream along with a request whose code is listed and that is it. |
I don't see anything wrong, but there's a lot going on. I would delete everything to start in the API body, make sure that works, then slowly re-add parts of the code to narrow it down. |
Sure thank you |
Sorry, I meant you should do that. I will wait to hear what you find. |
Weirdly enough, I have a model called Stream too and this is happening to me, sharing none of the above code. @Bilal-Abbas-Gigalabs did you manage to solve it? @dblock perhaps? |
Hi, I also encountered the same error. In my case, it was because I had defined In such a situation,
I hope this helps. Thank you. |
I am getting
Grape::Middleware::Formatter : undefined method `collect' for #<Stream:0x00007f685ce13270>
My code works fine, I have tested each line by my hand but if I run the whole API this error appears.
My code is as follow
The text was updated successfully, but these errors were encountered: