Circle V2 API Docs
    Preparing search index...

    Module @repo/errors

    @repo/errors

    @repo/errors provides the shared error model for the monorepo. It exports CircleError (an abstract base with code, domain, .with() context, and .toJSON()), plus UnhandledError, ValidationError, and EnvironmentVariableNotSetError.

    %%{init:{"theme":"dark"}}%% graph TD errors["@repo/errors"] errors -.-> tsconfig["@repo/typescript-config"] errors -.-> vitest["@repo/vitest-config"]
    %%{init:{"theme":"default"}}%% graph TD errors["@repo/errors"] errors -.-> tsconfig["@repo/typescript-config"] errors -.-> vitest["@repo/vitest-config"]
    graph TD
      errors["@repo/errors"]
      errors -.-> tsconfig["@repo/typescript-config"]
      errors -.-> vitest["@repo/vitest-config"]
    import { CircleError, ValidationError } from "@repo/errors";

    class PatientNotFoundError extends CircleError {
    readonly code = "PATIENT_NOT_FOUND" as const;
    readonly domain = "patients" as const;
    }

    const error = new PatientNotFoundError("No patient with that ID").with({
    patientId: "abc-123",
    });
    Script Description
    check-types Runs tsc --noEmit to typecheck the package.

    Classes

    CircleError
    EnvironmentVariableNotSetError
    UnhandledError
    ValidationError