> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cybr.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> These docs cover learner integrations through Hosted Lab Pages, the SDK, and the REST API. Content management is outside this integration scope.
> Read the setup page for the chosen approach before implementing it. Keep organization API keys and hosted mint secrets on the server.
> The public SDK is coming soon. Check the SDK quickstart for current availability. Do not invent installation commands or direct readers to a private package.
> Cybr provides completion tracking and CTF verification. The integrating platform decides whether to award points.

# SDK errors

> Error categories and diagnostic fields.

HTTP and polling failures use `CybrLabsError`. Local argument validation can throw `TypeError` or `RangeError`.

The browser terminal helper uses ordinary `Error` callbacks. It does not import the server error class.

## Error fields

| Field | Meaning |
| - | - |
| `code` | SDK error category |
| `message` | SDK error description |
| `status` | HTTP status, if a response arrived |
| `backendCode` | Original API error code |
| `retryAfter` | Rate-limit wait in seconds |
| `activeCount` | Active deployments for a concurrency error |
| `limit` | Organization deployment cap |
| `errors` | Field details for invalid input, where available |
| `cause` | Underlying error, where available |

## Categories

| Code | Meaning | Response |
| - | - | - |
| `invalid_key` | Missing or invalid API key | Correct server configuration |
| `invalid_request` | Invalid request fields | Correct the request |
| `access_denied` | Access or membership does not permit the action | Check your access policy |
| `not_found` | Resource is absent or outside organization access | Check the saved ID |
| `conflict` | Current state does not permit the action | Read current status |
| `rate_limited` | Request limit reached | Wait for `retryAfter` |
| `concurrency_limited` | Active deployment cap reached | Wait for teardown to release capacity |
| `subscription_required` | Organization subscription is inactive | Contact your organization administrator |
| `server_error` | Server request failed | Preserve state and assess retries |
| `timeout` | Request or wait deadline passed | Reconcile write outcomes |
| `network_error` | No successful HTTP connection | Check server connectivity |
| `deployment_failed` | Readiness polling found a failed or ended deployment | Stop the wait |
| `aborted` | Caller canceled a wait or session request | Keep or end the deployment separately |
| `api_error` | Unexpected API response | Record diagnostics for support |

## Completion errors

`COMPLETION_RECORD_FAILED` returns HTTP `500`. The SDK maps it to `server_error` and preserves `backendCode`.

No successful completion response follows a failed persistence attempt. The application still deduplicates its own progress updates.

## Terminal errors

Terminal backend codes map to these SDK categories:

| Backend code | SDK category |
| - | - |
| `INVALID_DEPLOYMENT_ID` | `invalid_request` |
| `TERMINAL_NOT_ENABLED`, `TERMINAL_NOT_SUPPORTED` | `access_denied` |
| `LAB_ENDED`, `TERMINAL_ENDED` | `deployment_failed` |
| `CONTAINER_STARTING`, `TERMINAL_UNAVAILABLE`, `TERMINAL_NOT_CONFIGURED` | `server_error` |
| `NO_TERMINAL_CREDENTIALS`, `NO_TERMINAL_ROLE` | `server_error` |

The terminal session method recognizes `CONTAINER_STARTING` for its bounded startup loop. Your interface can show the resulting error category.

See the [terminal REST reference](/api-reference/create-terminal-session) for HTTP statuses and the [error guide](/guides/error-handling) for recovery.
