Status 200 - OK

GraphQL does not return status codes in the same way that REST APIs do. For example, GraphQL can return a 200 OK in cases where a REST API would return a 5xx or 4xx status code. Due to this fact, GraphQL can return a 200 OK even when an action at the application level fails.

Error Handling

To check for errors, you need to check for the 'errors' object within the response, which contains additional information about what caused the issue. Some mutations also have a "Success" boolean as a return field, that will return true or false, depending on the success or failure of the action. To check the return fields of all mutations and queries, check our API Docs.

{
  "data": {
    "deleteCard": null
  },
  "errors": [
    {
      "message": "Card not found with id: 00000000",
      "locations": [
        {
          "line": 32,
          "column": 3
        }
      ],
      "path": [
        "deleteCard"
      ],
      "code": 30003,
      "type": "ResourceNotFoundError"
    }
  ]
}
{
  "data": {
    "updateFieldsValues": {
      "success": false
    }
  }
}

4XX and 5XX Status Codes

As mentioned above, in most cases GraphQL will return a 200 OK response when a REST API would return a 4xx or 5xx status code. But in some specific cases, a 4xx or 5xx status code can be returned. See below those cases and an explanation of them.

Status Code

Explaining

401

Unauthorized. A valid token was not passed within the request header.

404

Not found. The resource is not available.

422

Unprocessable Entity. Pipefy is not able to process the request.

429

Too many requests. This error occurs when you reach the rate limit for API Calls. Check the 'Request Limits' section of this article to understand limits.

5xx

Internal error within Pipefy