-
Notifications
You must be signed in to change notification settings - Fork 26
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
More clear error when including an entity is not configured correctly for JsonApiBundle #13
Comments
I think any PR is helpful. More clear error messages are always welcome. |
@drewclauson What was the mapping you had when you encounterd this error? I can't reproduce any weird errors when leaving out some mappings. |
I'll post my actual entities on Monday that cause the error. Thanks! On Sep 12, 2015, 7:25 AM -0400, Steffen [email protected], wrote:
|
Here is the actual entity, sorry it's pretty long. Note that there aren't any JsonApiBundle decorations.
Here is my controller:
When doing a GET on /invoices, I get this response:
|
I inadvertently tried to serialize an entity that wasn't configure for JsonApiBundle correctly and got the message: "Error: Call to a member function getType() on null" on line 334 of JsonEventSubscriber.php.
Once I configured the entity with the correct decorations, it worked.
It'd be nice to have it return some sort of error that is a little more descriptive as to the issue it's encountered. I'd take a stab at a PR, and I'm willing to, but wanted to see if you thought this would be helpful?
The text was updated successfully, but these errors were encountered: