Details
-
Story
-
Status: Closed (View Workflow)
-
P3
-
Resolution: Won't Do
-
None
-
customfield_11100 18309
-
5
-
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.