Closed mkanoor closed 4 years ago
Fixes #178 Uses Rack::Utils.status_code to convert the Rails HTTP error symbols to numeric values. The status_code can handle integers/strings/symbols and returns the appropriate numeric value e.g.
Rack::Utils.status_code(400) => 400 Rack::Utils.status_code("400") => 400 Rack::Utils.status_code(:forbidden) => 403
The JSON API Error Object Sample https://jsonapi.org/examples/#error-objects-basics
The status value should be https://jsonapi.org/format/#errors status: the HTTP status code applicable to this problem, expressed as a string value.
Fixes #178 Uses Rack::Utils.status_code to convert the Rails HTTP error symbols to numeric values. The status_code can handle integers/strings/symbols and returns the appropriate numeric value e.g.
Rack::Utils.status_code(400) => 400 Rack::Utils.status_code("400") => 400 Rack::Utils.status_code(:forbidden) => 403
The JSON API Error Object Sample https://jsonapi.org/examples/#error-objects-basics
The status value should be https://jsonapi.org/format/#errors status: the HTTP status code applicable to this problem, expressed as a string value.