Reference

Errors and limits

Handle authentication, validation, conflicts, throttling, and runtime failures.

401 means credentials are missing or invalid. 403 means the credential lacks the required permission. 404 also protects organization boundaries, so a resource in another organization looks absent. 409 indicates a conflict. 429 and 5xx responses may be retried with bounded backoff.

Validation failures use 400 with code invalid_request. Common examples include a missing templateId, an invalid cursor, a port outside 1 through 65535, a preview or tunnel TTL outside 1 through 3600, an unavailable runtime, or a sandbox that has no live provider machine for data-plane access.

ZeishApiError exposes status, code, details, method, and path. Reads can use the SDK's transient retry transport. Mutations should use a stable Idempotency-Key instead of blindly replaying a request.

terminal
1import { ZeishApiError, createZeishApi } from "@zeish/computesdk-provider";23try {4  await createZeishApi({5    apiKey: process.env.ZEISH_API_KEY!,6    baseUrl: "https://api.zei.sh/api/v1",7  }).getSandbox(sandboxId);8} catch (error) {9  if (error instanceof ZeishApiError) {10    console.error(error.status, error.code, error.details);11  }12  throw error;13}