Bug 41143 - Searching EBSCO packages results in 500 error due to Content-type
Summary: Searching EBSCO packages results in 500 error due to Content-type
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: ERM (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 33481
Blocks:
  Show dependency treegraph
 
Reported: 2025-10-30 14:48 UTC by Pedro Amorim
Modified: 2025-10-30 15:13 UTC (History)
6 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Crowdfunding goal: 0
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 Pedro Amorim 2025-10-30 14:48:07 UTC

    
Comment 1 Pedro Amorim 2025-10-30 14:49:27 UTC
We started getting these errors when searching for packages in ERM eHoldings:

[2025/10/30 14:18:08] [WARN] ERROR - EBSCO API /packages?orderby=packagename&offset=1&count=1 returned 400 - The value 'application/json; charset=UTF-8' is not valid for the 'contenttype' parameter. Allowed values: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, all, aggregatedfulltext, abstractandindex, ebook, ejournal, print, unknown, onlinereference, streamingmedia, mixedcontent}.
[2025/10/30 14:18:08] [ERROR] GET /api/v1/erm/eholdings/ebsco/packages: unhandled exception (Mojo::Exception)<<ERROR requesting EBSCO API
/packages?orderby=packagename&offset=1&count=1
code 400: The value 'application/json; charset=UTF-8' is not valid for the 'contenttype' parameter. Allowed values: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, all, aggregatedfulltext, abstractandindex, ebook, ejournal, print, unknown, onlinereference, streamingmedia, mixedcontent}.>>

Reverting bug 33481 appears to prevent this from happening. But this looks weird, there seems to be something happening with contenttype vs content-type in the request.
Comment 2 Pedro Amorim 2025-10-30 15:12:46 UTC
Reverting bug 33481 appears to cause things to go wrong with selecting and deselecting titles and packages so a proper fix is required here.