errors.ts — ui Source File
Architecture documentation for errors.ts, a typescript file in the ui codebase. 1 imports, 2 dependents.
Entity Profile
Dependency Diagram
graph LR f7f7a7b3_695f_ee49_7087_eefcb981b572["errors.ts"] 6802ce19_522d_e5fb_e458_8826d9f6952e["zod"] f7f7a7b3_695f_ee49_7087_eefcb981b572 --> 6802ce19_522d_e5fb_e458_8826d9f6952e 547e383a_ce02_05af_40e3_474a83fcfd23["api.test.ts"] 547e383a_ce02_05af_40e3_474a83fcfd23 --> f7f7a7b3_695f_ee49_7087_eefcb981b572 9ef55c05_4ae8_de0d_13ee_4570ec1b1c55["namespaces.test.ts"] 9ef55c05_4ae8_de0d_13ee_4570ec1b1c55 --> f7f7a7b3_695f_ee49_7087_eefcb981b572 style f7f7a7b3_695f_ee49_7087_eefcb981b572 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { z } from "zod"
// Error codes for programmatic error handling
export const RegistryErrorCode = {
// Network errors
NETWORK_ERROR: "NETWORK_ERROR",
NOT_FOUND: "NOT_FOUND",
UNAUTHORIZED: "UNAUTHORIZED",
FORBIDDEN: "FORBIDDEN",
FETCH_ERROR: "FETCH_ERROR",
// Configuration errors
NOT_CONFIGURED: "NOT_CONFIGURED",
INVALID_CONFIG: "INVALID_CONFIG",
MISSING_ENV_VARS: "MISSING_ENV_VARS",
// File system errors
LOCAL_FILE_ERROR: "LOCAL_FILE_ERROR",
// Parsing errors
PARSE_ERROR: "PARSE_ERROR",
VALIDATION_ERROR: "VALIDATION_ERROR",
// Generic errors
UNKNOWN_ERROR: "UNKNOWN_ERROR",
} as const
export type RegistryErrorCode =
(typeof RegistryErrorCode)[keyof typeof RegistryErrorCode]
export class RegistryError extends Error {
public readonly code: RegistryErrorCode
public readonly statusCode?: number
public readonly context?: Record<string, unknown>
public readonly suggestion?: string
public readonly timestamp: Date
public readonly cause?: unknown
constructor(
message: string,
options: {
code?: RegistryErrorCode
statusCode?: number
cause?: unknown
context?: Record<string, unknown>
suggestion?: string
} = {}
) {
super(message)
this.name = "RegistryError"
this.code = options.code || RegistryErrorCode.UNKNOWN_ERROR
this.statusCode = options.statusCode
this.cause = options.cause
this.context = options.context
this.suggestion = options.suggestion
this.timestamp = new Date()
if (Error.captureStackTrace) {
Error.captureStackTrace(this, this.constructor)
}
// ... (286 more lines)
Domain
Subdomains
Classes
- ConfigMissingError
- ConfigParseError
- InvalidConfigIconLibraryError
- RegistriesIndexParseError
- RegistryError
- RegistryFetchError
- RegistryForbiddenError
- RegistryInvalidNamespaceError
- RegistryLocalFileError
- RegistryMissingEnvironmentVariablesError
- RegistryNotConfiguredError
- RegistryNotFoundError
- RegistryParseError
- RegistryUnauthorizedError
Types
Dependencies
- zod
Source
Frequently Asked Questions
What does errors.ts do?
errors.ts is a source file in the ui codebase, written in typescript. It belongs to the FrameworkTooling domain, SchemaValidation subdomain.
What does errors.ts depend on?
errors.ts imports 1 module(s): zod.
What files import errors.ts?
errors.ts is imported by 2 file(s): api.test.ts, namespaces.test.ts.
Where is errors.ts in the architecture?
errors.ts is located at packages/shadcn/src/registry/errors.ts (domain: FrameworkTooling, subdomain: SchemaValidation, directory: packages/shadcn/src/registry).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free