Bug 33481 - EBSCO ws return 415: Content type 'application/octet-stream' not supported
Summary: EBSCO ws return 415: Content type 'application/octet-stream' not supported
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: ERM (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 32030
Blocks:
  Show dependency treegraph
 
Reported: 2023-04-11 11:36 UTC by Jonathan Druart
Modified: 2023-12-28 20:42 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.05


Attachments
Bug 33481: Pass content-type when requesting EBSCO's webservice (879 bytes, patch)
2023-04-11 11:37 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33481: Pass content-type when requesting EBSCO's webservice (938 bytes, patch)
2023-04-11 12:08 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 33481: Pass content-type when requesting EBSCO's webservice (1.01 KB, patch)
2023-04-14 06:22 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2023-04-11 11:36:53 UTC
ERROR - EBSCO API /vendors/19/packages/3816 returned 415 - Content type 'application/octet-stream' not supported
[ERROR] PATCH /api/v1/erm/eholdings/ebsco/packages/19-3816: unhandled exception (Mojo::Exception)<<ERROR requesting EBSCO API
/vendors/19/packages/3816
code 415: Content type 'application/octet-stream' not supported>>
Comment 1 Jonathan Druart 2023-04-11 11:37:32 UTC
Created attachment 149434 [details] [review]
Bug 33481: Pass content-type when requesting EBSCO's webservice
Comment 2 Pedro Amorim 2023-04-11 12:08:48 UTC
Created attachment 149436 [details] [review]
Bug 33481: Pass content-type when requesting EBSCO's webservice

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 3 Pedro Amorim 2023-04-11 12:17:08 UTC
It appears that some update on EBSCO's end has started to cause this error (tighter validation?).
It also appears we should be sending the request header in the first place anyway, and we weren't.

https://developer.ebsco.com/knowledge-services/holdingsiq/code-samples

The patch fixes the "add packages to holdings" button bug, sample link to reproduce:
http://localhost:8081/cgi-bin/koha/erm/eholdings/ebsco/packages/186-3962361


However the same apparent issue is also happening on "add titles to holdings" but not sure yet if related to this or a different bug, logs and console are not showing anything at first glance:
http://localhost:8081/cgi-bin/koha/erm/eholdings/ebsco/resources/19-2691705-28038201
Comment 4 Jonathan Druart 2023-04-11 12:30:50 UTC
(In reply to Pedro Amorim from comment #3)
> However the same apparent issue is also happening on "add titles to
> holdings" but not sure yet if related to this or a different bug, logs and
> console are not showing anything at first glance:
> http://localhost:8081/cgi-bin/koha/erm/eholdings/ebsco/resources/19-2691705-
> 28038201

It works for me on other resources, for instance
/cgi-bin/koha/erm/eholdings/ebsco/resources/19-3754-560226
Comment 5 Pedro Amorim 2023-04-11 17:17:52 UTC
It seems bug 33485 has fixed the EBSCO titles issue.
Comment 6 Marcel de Rooy 2023-04-14 06:22:32 UTC
Created attachment 149634 [details] [review]
Bug 33481: Pass content-type when requesting EBSCO's webservice

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 7 Tomás Cohen Arazi 2023-04-14 14:20:22 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 8 Matt Blenkinsop 2023-04-18 12:06:19 UTC
Nice work everyone!

Pushed to stable for 22.11.x