Error Codes

    All error responses return a JSON body with a message field. Security-sensitive endpoints return generic messages to prevent information disclosure.

    Response Format

    json
    {
      "message": "Validation failed: phoneNumber must be in E.164 format"
    }

    Status Codes

    CodeNameDescription
    400Bad RequestThe request body or parameters are invalid. Check the error message for specifics.
    401UnauthorizedInvalid or missing API key. Check your x-api-key header.
    402Payment RequiredThe workspace is out of capacity. This is never about key access - an invalid or wrongly scoped key returns 401 or 403. The key stays valid. On an agent-registered workspace a human has not yet claimed, the response carries a claim block naming POST /claim, which mints a one-time link for a person to add capacity; carry on with the same key afterwards.
    403ForbiddenYour key cannot make this request: it is scoped to a different workspace, it lacks the scope the route requires, or you have exceeded your per-minute request rate limit. Rate limiting is enforced in the API Gateway authorizer, which can only deny with 403, so a rate-limited request arrives here rather than as a 429.
    404Not FoundThe requested resource does not exist or belongs to a different workspace.
    409ConflictThe request conflicts with the current state (e.g., job already running).
    429Too Many RequestsA concurrency ceiling is full - too many mapping, mission-test or digital-test runs are already in flight for your workspace. Wait for a run to finish and retry. No Retry-After header is sent; per-minute request rate limiting returns 403, not this code.
    500Internal Server ErrorAn unexpected error occurred. Contact support if the issue persists.

    SDK error types

    The SDKs raise typed exceptions, so you can either catch by status code or by class. All API error subclasses inherit from NopaqueAPIError and carry status, code, details, and request_id / requestId.

    HTTPException class
    400ValidationError
    401AuthenticationError
    403PermissionError
    404NotFoundError
    409ConflictError
    429RateLimitError (carries retry_after / retryAfter)
    5xxServerError
    –APIConnectionError (network failure, including S3 PUT/GET)
    –APITimeoutError (request exceeded timeout)
    python
    from nopaque import Nopaque, NotFoundError, RateLimitError
    
    client = Nopaque()
    
    try:
        job = client.mapping.get("map_does_not_exist")
    except NotFoundError as e:
        print(f"Not found: {e.message}, request_id={e.request_id}")
    except RateLimitError as e:
        print(f"Rate limited, retry after {e.retry_after}s")