Revise error message: when the /item-storage/batch... API call contains an invalid value - 500 error is returned

Description

 

Overview:
When a POST call is made to /item-storage/batch/synchronous?upsert=true that contains an invalid value for permanentLoanTypeId the response is a 500 error without returning any details about the problem.

 

Steps to Reproduce:

POST to
https://okapi-bugfest-orchid.int.aws.folio.org/item-storage/batch/synchronous?upsert=true

BODY (attached in text file)

 

 

Expected Results:

The API should return details about the error.

Actual Results:
The API call returns a 500 - internal server error - without any details about the problem.  This issue is recorded in the log:
[mod_inventory_storage] ERROR Conn saveBatch size=1 ERROR: invalid input syntax for type uuid: "[no permanentLoanTypeId]" (22P02)

Additional Information:
URL:

Interested parties:

Environment

None

Potential Workaround

None

Attachments

5

Checklist

hide

TestRail: Results

Activity

Show:

Valery_Pilko November 30, 2023 at 1:45 PM
Edited

Hey  
Verified on Snapshot - works as described
See attached screencast:

But isn't it strange that "500" error is returned when invalid format (syntax) in "UUID" string?

Closing this issue as existing error message meets expectations.
cc:  

Khalilah Gambrell November 29, 2023 at 2:50 PM

Thanks Michelle. 

and , should we close this issue? 

Michelle Suranofsky November 29, 2023 at 2:21 PM
Edited

- looks good! thank you!

Khalilah Gambrell November 29, 2023 at 2:15 PM

Hey   - can you review 's comment above? Any concerns with the error messages returned?

Oleg Pak November 29, 2023 at 12:32 PM

It works on the environment already.

Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Spitfire

Release

Quesnelia (R1 2024)

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs
Created August 25, 2023 at 4:55 PM
Updated November 30, 2023 at 2:05 PM
Resolved November 30, 2023 at 2:05 PM
TestRail: Cases
TestRail: Runs