Bug 39905 - Post request to /checkouts results in 500 error
Summary: Post request to /checkouts results in 500 error
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: REST API (show other bugs)
Version: 24.11
Hardware: PC Linux
: P5 - low major
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-14 20:26 UTC by Myranda Fuentes
Modified: 2025-05-14 20:26 UTC (History)
1 user (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Myranda Fuentes 2025-05-14 20:26:43 UTC
Making a POST request to /api/v1/checkouts with a body of (for example)
{
"patron_id": 123,
"item_id": 456,
}
Using OAuth and a Bearer token to authenticate is returning a 500 error. This is attempting the request from Aspen Discovery 25.05, for which I've cross created the following issue number, since I can't tell where the problem originates for sure: https://aspen-discovery.atlassian.net/browse/DIS-816.

I didn't see anything come up in api-error.log but plack-api-error.log shows the following: POST /api/v1/checkouts: unhandled exception (Mojo::Exception)<<Can't use an undefined value as a HASH reference at /usr/share/koha/lib/Koha/REST/V1/Checkouts.pm line 143.>>

First time poster here, so please let me know if I can provide any additional details or how to better submit a bug are also appreciated.