Skip to main content

Error response shape

Every error returns this structure:
{
  "error": {
    "code": "artifact_not_found",
    "message": "Artifact art_xxx was not found.",
    "status": 404
  }
}
  • code — stable, machine-readable string. Match on this. Part of the V1 API contract.
  • message — human-readable. May change without notice. Do not parse.
  • status — HTTP status code (duplicated in the body for convenience).
For rate limit errors, an additional field is included:
{
  "error": {
    "code": "rate_limited",
    "message": "Too many requests. Try again in 5 seconds.",
    "status": 429,
    "retry_after_seconds": 5
  }
}

Complete error code reference

CodeHTTPMeaningAgent action
invalid_request400Malformed body, missing fields, invalid metadata keyAbort. Fix the request. Same input always fails.
ttl_exceeds_plan_limit400TTL exceeds plan max (Free: 90d, Pro: 365d)Retry with shorter TTL or escalate for upgrade.
upload_not_found400complete called but blob missing in R2Retry the PUT upload, then call complete again.
unauthorized401Invalid, missing, or revoked API keyAbort immediately. Do not retry. Check or rotate key.
quota_exceeded403Storage or request quota reachedAbort. Delete old artifacts or upgrade plan.
artifact_not_found404No artifact with this ID for this tenantAbort. Stale reference. Re-query to find correct artifact.
session_not_found404No artifacts exist for this session (seal endpoint only)Abort. Verify the session ID.
session_sealed409Upload to a sealed sessionUse a different session. No unseal operation exists.
artifact_expired410Artifact’s TTL has passedAbort. Re-generate from source. Cannot recover.
artifact_already_deleted410Artifact was soft-deletedTreat as success if intent was to delete. Otherwise, artifact is gone.
file_too_large413Exceeds size limitSwitch method. Direct: 500 MB max. Presigned: 5 GB max.
rate_limited429Burst limit exceeded (100 req/s sustained)Retry after retry_after_seconds. Implement exponential backoff.
These error codes are part of the V1 API contract. Existing codes will not be removed or renamed without a new API version. New codes may be added (non-breaking).

SDK exception mapping

The Python SDK maps each error code to a typed exception:
ExceptionAPI error code
ArtifactaErrorBase class for all errors
InvalidRequestErrorinvalid_request
UnauthorizedErrorunauthorized
QuotaExceededErrorquota_exceeded
ArtifactNotFoundErrorartifact_not_found
ArtifactExpiredErrorartifact_expired
SessionSealedErrorsession_sealed
TTLExceedsPlanLimitErrorttl_exceeds_plan_limit
RateLimitedErrorrate_limited (includes .retry_after_seconds)
from artifacta import Client, ArtifactNotFoundError, ArtifactExpiredError

client = Client()

try:
    artifact = client.get("art_2xk9f7v3m1p0")
except ArtifactNotFoundError:
    print("Artifact was never created or ID is wrong")
except ArtifactExpiredError:
    print("Artifact existed but TTL passed — re-generate from source")

CLI exit codes

Exit codeMeaning
0Success
1Client error (bad input, auth failure, not found)
2Server error
3Network error