Business Teams Service GraphQL error handling

The GraphQL system does not use the normal REST API error handling. Learn more about how GraphQL handles errors.

Most of the time, the two REST endpoints on teamserver/rest/graphql return the HTTP status OK (200)even when there is an error.

A response that includes an error might look like the following:

{
    "data": {
        "team": {
            "uuid": "ddc12371-b71a-4a9a-b819-6cb29713ff65",
            "displayName": "Team1"
        }
    },
    "errors": [
        {
            "locations": [
                {
                    "column": 33,
                    "line": 1
                }
            ],
            "message": "CWLUM1017E: Error in GraphQL query: ..."
        }
    ],
    "extensions": {}
}

There are cases when the two REST endpoints on teamserver/rest/graphql return an HTTP status code that is not the OK code (200). This happens if the error is outside the GraphQL processing, for example, when the JSON input of the POST request cannot be parsed. In this case, the response will not be in the GraphQL response format because the GraphQL processing was not even started.