Error Handling¶
OAI-PMH Error Codes¶
badVerb¶
Meaning: Unknown or missing verb
Example: ?verb=GetStuff
Solution: Use a valid OAI-PMH verb
badArgument¶
Meaning: Invalid or missing parameters
Examples:
- ?verb=ListRecords (without metadataPrefix)
- ?verb=ListRecords&resumptionToken=xyz&set=abc (resumptionToken with other parameters)
- Invalid date formats in from or until
Solution: Add required parameters or correct the syntax
cannotDisseminateFormat¶
Meaning: Format not supported
Example: ?verb=ListRecords&metadataPrefix=marc21&set=ehri:camps
Solution: Use oai_dc for virtual sets
idDoesNotExist¶
Meaning: Identifier does not exist
Example: ?verb=GetRecord&identifier=invalid-id&metadataPrefix=oai_dc
Solution: Check the identifier
noRecordsMatch¶
Meaning: No matches found
Example: Empty set or no matches in date range
Solution: Check set and date range
badResumptionToken¶
Meaning: Token invalid or expired
Solution: Restart harvesting
HTTP Status Codes¶
The OAI-PMH adapter follows the OAI-PMH protocol specification:
- 200 OK: Always returned for OAI-PMH requests (even when there are errors)
- OAI-PMH errors are indicated in the XML response body, not HTTP status codes
Note: The /health endpoint (not part of OAI-PMH) returns:
- 200 OK: Service is healthy
- 500 Internal Server Error: Health check failed