/**
* Check accept header
*
* @param AcceptHeaderInterface $header
* @return Error
*/
private function checkAcceptHeader(AcceptHeaderInterface $header)
{
$this->matcher->matchEncoder($header);
if (null === $this->matcher->getEncoderHeaderMatchedType()) {
throw new JsonApiException($this->createApiError(JsonApiException::HTTP_CODE_UNSUPPORTED_MEDIA_TYPE, self::UNSUPPORTED_ACCEPT_ERROR, 'Unsupported media type'), JsonApiException::HTTP_CODE_UNSUPPORTED_MEDIA_TYPE);
}
}