Add notAcceptable() method to Handler class in edge-commons module

Description

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

Environment

None

Potential Workaround

None

Checklist

hide

TestRail: Results

Activity

Show:
Done

Details

Assignee

Reporter

Labels

Priority

Story Points

Sprint

Development Team

Gulfstream

Fix versions

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created March 25, 2020 at 3:50 PM
Updated June 12, 2020 at 3:41 PM
Resolved March 31, 2020 at 7:34 AM
TestRail: Cases
TestRail: Runs