kurierjs / kurier

TypeScript framework to create JSON:API compliant APIs
https://kurier.readthedocs.io/en/latest/
MIT License
61 stars 9 forks source link

[1.3.x] errors.status should be a string #369

Closed nelson6e65 closed 9 months ago

nelson6e65 commented 10 months ago

The JSON:API specification states:

"[...] the HTTP status code applicable to this problem, expressed as a string value"

But in the JSON response, it is a number instead of string.

{
  "errors": [
    {
      "status": 501
    }
  ]
}

And if I use string, I get this warning:

Warning express deprecated res.status("501"): use res.status(501) instead

😅