We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fb496b7 commit ad09f50Copy full SHA for ad09f50
packages/connect/src/constants/errors.ts
@@ -69,6 +69,11 @@ export class TrezorError extends Error {
69
this.code = code;
70
this.message = message;
71
}
72
+
73
+ // Error.prototype.toString() does not include custom property `code`
74
+ toString() {
75
+ return `${this.name} (code: ${this.code}): ${this.message}`;
76
+ }
77
78
79
export const TypedError = (id: ErrorCode, message?: string) =>
0 commit comments