Skip to content

JsonApiExceptionRenderer should have a method for filtering on Accepts header #188

@geoidesic

Description

@geoidesic
        if (!$this->controller->getRequest()->accepts('application/vnd.api+json')) {
            return parent::_outputMessage($template);
        }

This assumes that the usage of this renderer can only apply to jsonapi requests. However, this makes it somewhat inflexible.
It might be better to add a method like shouldBeBypassed, which can then be overridden to allow finer control of this logic.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions