Details
-
Type:
Story
-
Status: Closed (View Workflow)
-
Priority:
P3
-
Resolution: Done
-
Affects Version/s: None
-
Labels:None
-
Template:customfield_11100 18303
-
Sprint:eHoldings Sprint 44
-
Story Points:5
-
Back End Estimate:Small < 3 days
-
Estimation Notes and Assumptions:Estimate includes analysis and implementation
Description
When making requests to mod-kb-ebsco with an invalid Content-Type header (for example application/json instead of expected application/vnd.api+json). mod-kb-ebsco returns with a status code 500 and a stack trace.
{ "status": 500, "error": "Internal Server Error", "exception": "#<NoMethodError: undefined method `to_unsafe_hash' for nil:NilClass>", "traces": { "Application Trace": [ { "id": 10, "trace": "app/controllers/application_controller.rb:59:in `catch_flexirest_exceptions'" }, { "id": 12, "trace": "app/controllers/application_controller.rb:44:in `catch_repository_errors'" }, { "id": 14, "trace": "app/controllers/application_controller.rb:37:in `catch_exceptions'" }, { "id": 53, "trace": "app/middleware/chunked_transfer_decoder.rb:58:in `call'" } ], "Framework Trace": [ { "id": 0, "trace": "jsonapi-rails (0.3.1) lib/jsonapi/rails/controller.rb:72:in `block in deserializable_resource'" } ...
Expected instead it should have returned an indication of bad request/bad content type