Done
Details
Assignee
Anastasiia ZakharovaAnastasiia ZakharovaReporter
Anastasiia ZakharovaAnastasiia ZakharovaLabels
Priority
P2Story Points
5Sprint
NoneDevelopment Team
GulfstreamFix versions
TestRail: Cases
Open TestRail: CasesTestRail: Runs
Open TestRail: Runs
Details
Details
Assignee
Anastasiia Zakharova
Anastasiia ZakharovaReporter
Anastasiia Zakharova
Anastasiia ZakharovaLabels
Priority
Story Points
5
Sprint
None
Development Team
Gulfstream
Fix versions
TestRail: Cases
Open TestRail: Cases
TestRail: Runs
Open TestRail: Runs
Created March 26, 2020 at 11:47 AM
Updated June 12, 2020 at 3:32 PM
Resolved May 29, 2020 at 11:51 AM
Overview:
When an error occurs on OAI-PMH level (see OAI-PMH error conditions here) an HTTP error status code might be shown in HTTP header. When a harvester is seeing the HTTP error status code it immediately treats it as a failure without a deeper look on the OAI-PMH response (see harvester logs in attachment).
For example, for OAI-PMH error code “noRecordsMatch” 404 HTTP status code is returned. This indicates an error and essentially means repository didn’t find records which satisfy the request. The OAI-PMH spec does not explicitly say that certain HTTP status codes should be used. The whole current situation is next:
OAI-PMH error code
HTTP code
badArgument
400
badResumptionToken
400
badVerb
400
cannotDisseminateFormat
422
idDoesNotExist
404
noRecordsMatch
404
FOLIO repository can associate error on OAI-PMH level with 200 HTTP status, i.e. have the 200 HTTP status codes for all OAI PMH error conditions to 200, and return 4XX/5XX responses for HTTP level errors, e.g. invalid or missing API key.
However, old behavior shouldn't be wiped out, but the new tenant-specific configuration setting needs to be provided, that will define in which way OAI-PMH level errors are going to be processed within the FOLIO instance:
HTTP status 200 - OAI-PMH level error is associated with HTTP status 200
HTTP error status - OAI-PMH level error may be associated with HTTP error status (as is)
Acceptance criteria:
HTTP status 200 is possible to get for all OAI-PMH level error
New configuration setting defines the error processing behavior
Error processing setting is access-able for front-end
All changes should be applied to those errors from documentation which are utilized in FOLIO OAI-PMH module