fix(core): preserve structured error messages (#33530)

This commit is contained in:
Aiden Cline 2026-06-23 18:43:59 -05:00 committed by GitHub
commit c17b9557f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 73 additions and 9 deletions

View file

@ -82,7 +82,11 @@ export type ReconcileResult = { readonly _tag: "Unchanged" } | Updated | Replace
export class InitializationBlocked extends Schema.TaggedErrorClass<InitializationBlocked>()(
"SystemContext.InitializationBlocked",
{ keys: Schema.Array(Key) },
) {}
) {
override get message() {
return `System context initialization blocked by unavailable sources: ${this.keys.join(", ")}`
}
}
export class DuplicateKeyError extends Schema.TaggedErrorClass<DuplicateKeyError>()("SystemContext.DuplicateKeyError", {
key: Key,