Skip to:
In order to keep all HTTP error responses in one place, the Handler class needs to be extended with the new method notAcceptible(), which will:
end the response
set status code 406
content-type text/xml
text in response body is Accept header must be "text/xml" for this request, but it is "application/xml", can not send */*
Accept header must be "text/xml" for this request, but it is "application/xml", can not send */*
Repo link: https://github.com/folio-org/edge-common
Overview
In order to keep all HTTP error responses in one place, the Handler class needs to be extended with the new method notAcceptible(), which will:
end the response
set status code 406
content-type text/xml
text in response body is
Accept header must be "text/xml" for this request, but it is "application/xml", can not send */*
Repo link: https://github.com/folio-org/edge-common