Internal Server Error occurs when trying to update a catalog item with incorrect ID

Description

During exploratory tests, I noticed that the internal server error is returned when one tries to update a CCE catalog item when incorrect ID is provided, as on the screenshot.

Reproduction steps:

  1. Using the administrator's token, fetch the data of any catalog item with the use of the GET catalog items/id endpoint, e.g. the item's ID could be 94c6e021-0020-4af3-b789-306f2cd1dabb.

  2. Try to update the item's data with the use of the PUT catalog items/id endpoint. Provide the response from the previous request as "Body", e.g.:

  1. As ID, provide the item's ID minus the last character, e.g. "94c6e021-0020-4af3-b789-306f2cd1dab".

  2. The item is not updated. The 500 code and the following error message are returned:

  1. .

Expected behavior:

  • The 400 code and "Bad Request" should be returned, as well as an error message stating that the provided ID is incorrect.

Environment

None

Assignee

Hussein Hassan

Reporter

Joanna Bebak

Labels

Story Points

3

Epic Link

Components

Sprint

None

Fix versions

Priority

Major
Configure