jsonapi-rails
jsonapi-rails copied to clipboard
can't add custom message on jsonapi_errors, it a bug isn't it?
trafficstars
how to add some custom message like meta on jsonapi_errors ?
this is original example
{ "errors": [ { "status": "422", "source": { "pointer": "/data/attributes/password" }, "title": "Unprocessable Entity", "detail": "Password is invalid", "code": "invalid" } ] }
I want add some error message like :
{ "errors": [ { "status": "422", "source": { "pointer": "/data/attributes/password" }, "title": "Unprocessable Entity", "detail": "Password is invalid", "code": "invalid" "custom_message1" : { "value1" : "1", "value2" : "2" }, "custom_message1" : { "value1" : "1", "value2" : "2" } } ] }