-
Notifications
You must be signed in to change notification settings - Fork 153
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
serializing Grape::Entity::Exposure::NestingExposure::OutputBuilder fails in 0.7.0 #299
Comments
I'm getting a different error actually |
But same scenario, all my |
FYI, I ended up working around this by actually generating the json string instead of the intermediate json-like hash and then caching the raw value. That works better in our case anyway since all I'm doing after the cache call is returning raw json. |
Yeah we do that most of the time but occasionally we need to massage the hash in runtime (when it's still worth to pull stuff from the cache) and this kind of ruins that strategy. I followed down the rabbit hole a little bit but not so much that I can have a clear clue as to what's happening annoying :) thanks Kevin |
Hey, this problem still occurs :( |
I solved the problem through
|
Any chance of this ever going in ? I'll patch my own code but it would be nice to make it official . As a hint for specs, anything that does |
@dblock any inputs? I'm sure this happens often enough |
Fix problem caching Grape::Entity - This ensures Marshall.dump does not have issues with the Grape::Entity object we are caching via Rails.cache Reference: ruby-grape/grape-entity#299 Fix missing params for OccurenceCache init Include force flag in #fetch params Make sure hash has indifferent access
This issue just happened to me today. After some hours, I could solve it thanks to this comment: #299 (comment) |
When attempting to serialize a
Grape::Entity::Exposure::NestingExposure::OutputBuilder
in 0.7.0 usingMarshal.dump
(for caching), we encounter an error likeTypeError: can't dump IO
.This error seems to stem from the options hash in the entity. When it contains the request environment (in the
:env
key), there are objects that cannot be marshaled.In my testing (in development mode) the following keys contain unmarshalable items.
The text was updated successfully, but these errors were encountered: