Represents an error encountered during a request to the Connect API.
See Handling errors for more information.
Error
Name | Type | Tags | Description | Getter | Setter |
---|---|---|---|---|---|
category |
string(ErrorCategory) |
Required | Indicates which high-level category of error has occurred during a request to the Connect API. |
getCategory(): string | setCategory(string category): void |
code |
string(ErrorCode) |
Required | Indicates the specific error that occurred during a request to a Square API. |
getCode(): string | setCode(string code): void |
detail |
?string |
Optional | A human-readable description of the error for debugging purposes. | getDetail(): ?string | setDetail(?string detail): void |
field |
?string |
Optional | The name of the field provided in the original request (if any) that the error pertains to. |
getField(): ?string | setField(?string field): void |
{
"category": "API_ERROR",
"code": "INVALID_PAUSE_LENGTH",
"detail": "detail0",
"field": "field8"
}