fix: harden v2 custom widgets and Workshop (#6480)
This commit is contained in:
1 parent
e8a2c87c2d
commit
557ebe0a2f
138 files changed
+5151
-1976
No files matched your search
@@ -10,17 +10,19 @@ export type CustomWidgetDomainErrorCode =
|
||||
|
||||
export class CustomWidgetDomainError extends Error {
|
||||
public readonly code: CustomWidgetDomainErrorCode;
|
||||
public readonly reason?: "timeout";
|
||||
public readonly retryAfterMs?: number;
|
||||
|
||||
public constructor(input: {
|
||||
code: CustomWidgetDomainErrorCode;
|
||||
message: string;
|
||||
cause?: unknown;
|
||||
reason?: "timeout";
|
||||
retryAfterMs?: number;
|
||||
}) {
|
||||
super(input.message, { cause: input.cause });
|
||||
super(input.message);
|
||||
this.name = "CustomWidgetDomainError";
|
||||
this.code = input.code;
|
||||
this.reason = input.reason;
|
||||
this.retryAfterMs = input.retryAfterMs;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user