ApiErrorDetail
Interface
A single error detail from the API's response body.
The API returns an array of these in the errors field of error responses.
For validation errors, each detail corresponds to one invalid field.
Property | Type | Optional | Description |
|---|---|---|---|
|
| Yes | Machine-readable error rule or code from the validation layer.<br>Can be used for programmatic error handling or i18n error message lookups.<br> |
|
| Yes | Name of the form/request field that caused the validation error.<br>Only present for |
|
| No | Human-readable error message describing what went wrong.<br>Suitable for display to end users or logging. |
ErrorCode
TypeAlias
Error codes for Lynkow SDK errors.
Each code maps to a specific category of failure. Use these in catch blocks
to handle different error types:
Code | HTTP Status | When it occurs |
|---|---|---|
| 400 | Malformed request (missing required fields, bad format) |
| 400 | Request body fails server-side validation (see |
| 401 | Missing or invalid authentication (bad site ID) |
| 403 | Valid auth but insufficient permissions |
| 404 | Resource does not exist or is not published |
| 429 | Too many requests; retry after the indicated delay |
| 429 | Alias for |
| - | Request was aborted due to timeout (client-side) |
| - | DNS failure, connection refused, or network offline |
| 500 | Server-side error (bug or infrastructure issue) |
| 503 | API is temporarily down for maintenance |
| other | Unrecognized HTTP status or unexpected error |
type ErrorCode = "BAD_REQUEST" | "VALIDATION_ERROR" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "RATE_LIMITED" | "TOO_MANY_REQUESTS" | "TIMEOUT" | "NETWORK_ERROR" | "INTERNAL_ERROR" | "SERVICE_UNAVAILABLE" | "UNKNOWN"