According to the spec, codes in the exceptions must be strings. Currently generated errors aren't valid against the JSON API Schema. See cerebris/jsonapi-resources#675. An example:
{
"errors": [
{
"title": "Bad Request",
"detail": "This request is not supported.",
"code": 400,
"status": "400"
}
]
}