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

POST and PUT requests to packages with invalid "contentType" gives a 500/200

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Closed (View Workflow)
    • Priority: P3
    • Resolution: Won't Do
    • Affects Version/s: None
    • Fix Version/s: 1.3.0
    • Labels:
    • Template:
    • Story Points:
      5
    • Development Team:
      Spitfire

      Description

      When we make a POST request to /eholdings/packages to create a custom package with invalid contentType, for example of the request body below:

      {
      	"data": {
      		"type": "packages",
      		"attributes": {
      			"name": "custom packages api test-2",
      			"contentType": "invalid",
      			"customCoverage": {
      				"beginCoverage": "2003-01-01",
      				"endCoverage": "2003-12-01"
      			}
      		}
      	}
      }
      

      Notice how the contentType is "invalid" --> mod-kb-ebsco gives a 200 response with contentType of "Unknown". Not sure if we should validate the value passed in and throw an error

      Similarly, if we give an integer, for example, see request body below:

      {
      	"data": {
      		"type": "packages",
      		"attributes": {
      			"name": "custom packages api test-2",
      			"contentType": 123,
      			"customCoverage": {
      				"beginCoverage": "2003-01-01",
      				"endCoverage": "2003-12-01"
      			}
      		}
      	}
      }
      

      Notice how the contentType is 123, it gives a 500 Internal Server Error

      We see the same behavior with PUT requests as well.

      Must be done on all POST and PUT requests.

        TestRail: Results

          Attachments

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:

                  TestRail: Runs

                    TestRail: Cases