RegistriesIndexParseError Class — ui Architecture
Architecture documentation for the RegistriesIndexParseError class in errors.ts from the ui codebase.
Entity Profile
Dependency Diagram
graph TD d6a998dd_5dcd_fa0a_d040_5bb815b5320b["RegistriesIndexParseError"] f7f7a7b3_695f_ee49_7087_eefcb981b572["errors.ts"] d6a998dd_5dcd_fa0a_d040_5bb815b5320b -->|defined in| f7f7a7b3_695f_ee49_7087_eefcb981b572 49e98dfc_1ffc_e51e_3c05_621e0585eda7["constructor()"] d6a998dd_5dcd_fa0a_d040_5bb815b5320b -->|method| 49e98dfc_1ffc_e51e_3c05_621e0585eda7
Relationship Graph
Source Code
packages/shadcn/src/registry/errors.ts lines 289–325
export class RegistriesIndexParseError extends RegistryError {
public readonly parseError: unknown
constructor(parseError: unknown) {
let message = "Failed to parse registries index"
if (parseError instanceof z.ZodError) {
const invalidNamespaces = parseError.errors
.filter((e) => e.path.length > 0)
.map((e) => `"${e.path[0]}"`)
.filter((v, i, arr) => arr.indexOf(v) === i) // remove duplicates
if (invalidNamespaces.length > 0) {
message = `Failed to parse registries index. Invalid registry namespace(s): ${invalidNamespaces.join(
", "
)}\n${parseError.errors
.map((e) => ` - ${e.path.join(".")}: ${e.message}`)
.join("\n")}`
} else {
message = `Failed to parse registries index:\n${parseError.errors
.map((e) => ` - ${e.path.join(".")}: ${e.message}`)
.join("\n")}`
}
}
super(message, {
code: RegistryErrorCode.PARSE_ERROR,
cause: parseError,
context: { parseError },
suggestion:
"The registries index may be corrupted or have invalid registry namespace format. Registry names must start with @ (e.g., @shadcn, @example).",
})
this.parseError = parseError
this.name = "RegistriesIndexParseError"
}
}
Domain
Defined In
Source
Frequently Asked Questions
What is the RegistriesIndexParseError class?
RegistriesIndexParseError is a class in the ui codebase, defined in packages/shadcn/src/registry/errors.ts.
Where is RegistriesIndexParseError defined?
RegistriesIndexParseError is defined in packages/shadcn/src/registry/errors.ts at line 289.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free