fix(design): preserve command outcome certainty

This commit is contained in:
2026-09-03 18:25:06 +08:00
parent 4d8b19eeb5
commit a16dfd0d6f
15 changed files with 576 additions and 23 deletions

View File

@@ -1,6 +1,7 @@
import type {
DesignAsset,
DesignAssetUploadInput,
DesignCommandFailureOutcome,
DesignCommandInput,
DesignCommandResult,
DesignCreateWorkspaceInput,
@@ -20,12 +21,19 @@ export type CloseEventSessionsOptions = {
export class DesignWorkspaceModuleError extends Error {
readonly status: number;
readonly code: string;
readonly commandOutcome?: DesignCommandFailureOutcome;
constructor(status: number, code: string, message: string) {
constructor(
status: number,
code: string,
message: string,
commandOutcome?: DesignCommandFailureOutcome,
) {
super(message);
this.name = 'DesignWorkspaceModuleError';
this.status = status;
this.code = code;
this.commandOutcome = commandOutcome;
}
}