added

New `errors` object in API errors

In API version 2024-10, we added the errors object to all API errors to comply with GraphQL specifications. Check out the before and after sample errors below!

Before

{
  "error_message": "User unauthorized to perform action",
  "error_code": "UserUnauthorizedException",
  "error_data": {}, 
  "status_code": 403,
  "account_id": 123456
}

After

{
  "errors": [
    {
      "message": "User unauthorized to perform action",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "me"
      ],
      "extensions": {
        "code": "UserUnauthorizedException",
        "error_data": {},
        "status_code": 403
      }
    }
  ],
  "error_message": "User unauthorized to perform action",
  "error_code": "UserUnauthorizedException",
  "error_data": {},
  "status_code": 403,
  "account_id": 123456
}