Skip to content

Micro server not handling Network errors #1581

@ghost

Description

**Updated below to issue with micro server *

When a mutation error occurs a JSON reponse with an error object is returned - the client can parse and handle this.
{data: {requestToken: null},errors: [{message: "Unknown User"}]

However, when a schema error or request error occurs, I get a string response which cannot be parsed client side.
HttpQueryError: {"errors":[{"message":"Variable.....}

This is using apollo-server-micro how should I catch these errors and provide a graceful message back to the client which could aide in debugging?

  • has-reproduction

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions