Closed llemeurfr closed 2 years ago
Almost a duplicate from #540, which was narrowed down to LCP.
https://datatracker.ietf.org/doc/html/rfc7807
C S :
{
"type": "loans_limit_reached",
"title": "You have reached the loan limit allowed by your library.",
"status": 403
}
The support of HTTP Problem Details should be as generic as possible in Thorium. Here is a first use case, but every HTTP error returned by an OPDS server should be treated as well.
Use case: library books have a limited count of copies, and when all copies are already used, a new user cannot borrow it.
In practice: an OPDS feed contains acquisition links of type "borrow". A link is activated, but the server wants to abort the action. It does that by returning an HTTP error + a json object detailed in rfc7807.
Several applications handle such HTTP Problem Details documents, including Aldiko and SimplyE. There is explicit mention of this in ODL: https://drafts.opds.io/odl-1.0#54-interacting-with-a-checkout-link
The
title
anddetails
of the HTTP Problem Details document should be based on the Accept-Language header of the client request. Therefore a modela box containing this information is displayed to the user.More information: see Readium Slack, channel opds, 31/08/2021