Closed curtis741 closed 7 months ago
@curtis741 sorry for the late response, please feel free to share a PR and we'll get it merged :pray:
@stas opened: https://github.com/stas/jsonapi.rb/pull/95
This can be closed as https://github.com/stas/jsonapi.rb/commit/7a105a5c4951e51f410533780a40b9a2efa79c28
Expected Behavior
That I can set the
code
in the error response objectsActual Behavior
I can only set these attributes:
Steps to Reproduce the Problem
render jsonapi_errors: { code: "some_code" }
I think it all comes from here: https://github.com/stas/jsonapi.rb/blob/07a96dc7b8d709b1281d09168746e46115c2fd0e/lib/jsonapi/error_serializer.rb#L11
and according to the spec I should be able to do this: https://jsonapi.org/format/#error-objects
maybe it should also support
meta
,id
andlinks
as well when you supply something that isn't an active model tojsonapi_errors
?