Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silent failure when the server reports an error. #20

Open
Stubbs opened this issue Nov 23, 2024 · 0 comments
Open

Silent failure when the server reports an error. #20

Stubbs opened this issue Nov 23, 2024 · 0 comments

Comments

@Stubbs
Copy link

Stubbs commented Nov 23, 2024

Describe the bug
When I make a call to a server, especially a raw query, and I get an error reponse back from the server there's no way to see this in the calling class.

To Reproduce
Steps to reproduce the behavior:
Make a raw call to the GraphQL server with a syntax error for example. The server I'm calling (Invision Community Server) returns an error like this

{
    "errors": [
        {
            "message": "Syntax Error: Expected {, found Name \"MutateForums\"",
            "extensions": {
                "category": "graphql"
            },
            "locations": [
                {
                    "line": 1,
                    "column": 63
                }
            ]
        }
    ]
}

Expected behavior
At the very least I'd like the error to be returned from the get method, but perhaps throw an error I can catch.

Would using Guzzle be an option? As a Laravel client the dependency is already there from Laravel.

Anyway, getting the error back would be a good start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant