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
The error pointer do not match the alias used in the serializer.
serializer :
attribute :reply do
@object.content
end
response when there is an active record error :
{"errors":[{"title":"Invalid content","detail":"Nouveau commentaire est trop court (au moins 16 caractères)","source":{}}],"jsonapi":{"version":"1.0"}}
Ideally source should contain a pointer to reply.
I am not sure If it is possible to correctly alias the error with the declaration done in a bloc.
The text was updated successfully, but these errors were encountered:
The errors are set by the deserializer, which are independent from the serializers. The deserializable module maintains a reverse mapping for renamed keys, which is used to generate the JSON pointer.
The error pointer do not match the alias used in the serializer.
serializer :
response when there is an active record error :
{"errors":[{"title":"Invalid content","detail":"Nouveau commentaire est trop court (au moins 16 caractères)","source":{}}],"jsonapi":{"version":"1.0"}}
Ideally source should contain a pointer to reply.
I am not sure If it is possible to correctly alias the error with the declaration done in a bloc.
The text was updated successfully, but these errors were encountered: