Skip to main content

Ulinkly REST API typed errors

REST failures use RFC 9457 Problem Details with the application/problem+json media type. Every problem includes a stable machine-readable code and the standard type, title, status, detail, and instance members.

HTTP/1.1 404 Not Found
Content-Type: application/problem+json
{
"type": "about:blank",
"title": "Not Found",
"status": 404,
"detail": "Link with slug 'missing' not found",
"instance": "/v1/sdk/links/missing",
"code": "NOT_FOUND",
"statusCode": 404,
"message": "Link with slug 'missing' not found",
"error": "Not Found"
}

For status-based problems, type is RFC 9457's about:blank; the stable code extension provides the machine-readable Ulinkly reason. The statusCode, message, and error extension members preserve compatibility with existing Ulinkly SDKs. New integrations should branch on status and code, not parse detail or message text. Clients must ignore extension members they do not recognize.

Validation errors​

Validation failures use VALIDATION_ERROR. The errors extension contains one object per validation issue:

{
"type": "about:blank",
"title": "Bad Request",
"status": 400,
"detail": "type must be one of the following values: unified, dynamic",
"instance": "/v1/sdk/links",
"code": "VALIDATION_ERROR",
"statusCode": 400,
"message": [
"type must be one of the following values: unified, dynamic"
],
"error": "Bad Request",
"errors": [
{ "detail": "type must be one of the following values: unified, dynamic" }
]
}

Stable codes​

The codes include:

CodeTypical statusMeaning
BAD_REQUEST400The request cannot be processed as sent.
VALIDATION_ERROR400One or more request fields failed validation.
UNAUTHORIZED401The API credential is missing, invalid, or expired.
FORBIDDEN403The credential is valid but cannot perform the operation.
NOT_FOUND404The requested resource does not exist in the credential's scope.
METHOD_NOT_ALLOWED405The route does not support this HTTP method.
CONFLICT409The request conflicts with current resource state.
GONE410The resource or route is no longer available.
PRECONDITION_FAILED412A request precondition was not met.
UNPROCESSABLE_ENTITY422The request is well formed but cannot be processed.
PRECONDITION_REQUIRED428The request must be made conditional.
RATE_LIMIT_EXCEEDED429Pause until the Retry-After delay expires.
INTERNAL_SERVER_ERROR500Retry only idempotent requests with backoff.
SERVICE_UNAVAILABLE503The service is temporarily unavailable; retry with backoff.

Any other status uses the code HTTP_<status>. Unknown 5xx failures deliberately omit internal exception details.