jsonapi-rails icon indicating copy to clipboard operation
jsonapi-rails copied to clipboard

can't add custom message on jsonapi_errors, it a bug isn't it?

Open helmiItsavirus opened this issue 5 years ago • 0 comments
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" } } ] }

helmiItsavirus avatar Jul 31 '20 10:07 helmiItsavirus