Uploaded image for project: 'ui-eholdings'
  1. ui-eholdings
  2. UIEH-485

BUG: mod-kb-ebsco invalid content-type header returns 500 stack trace

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Closed (View Workflow)
    • Priority: P3
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: Sprint 44, 1.0.0
    • Labels:
      None
    • Template:
    • 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

        TestRail: Results

          Attachments

            Activity

              People

              Assignee:
              sduvvuri Sobha Duvvuri
              Reporter:
              cgodfrey Carole Godfrey
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  TestRail: Runs

                    TestRail: Cases