Skip to content

throwing AuthenticationError should set the response status to 401 Unauthorized #1709

@dandv

Description

@dandv

apollo-server correctly returns a a "400 (Bad request)" error if the query fails to validate, but if the code throws an AuthenticationError per the docs, the status remains 200.

https://launchpad.graphql.com/z5n9190vz7

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    🌹 has-reproduction❤ Has a reproduction in Glitch, CodeSandbox or Git repository.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions