Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/faucet/src/api/httperror.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export class HttpError extends Error {

public constructor(status: number, text: string, expose = true) {
super(text);
this.name = "HttpError";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
this.name = "HttpError";
this.name = this.constructor.name;

this.status = status;
this.expose = expose;
}
Expand Down
2 changes: 2 additions & 0 deletions packages/stargate/src/stargateclient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export class TimeoutError extends Error {

public constructor(message: string, txId: string) {
super(message);
this.name = "TimeoutError";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
this.name = "TimeoutError";
this.name = this.constructor.name;

this.txId = txId;
}
}
Expand Down Expand Up @@ -179,6 +180,7 @@ export class BroadcastTxError extends Error {

public constructor(code: number, codespace: string, log: string | undefined) {
super(`Broadcasting transaction failed with code ${code} (codespace: ${codespace}). Log: ${log}`);
this.name = "BroadcastTxError";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
this.name = "BroadcastTxError";
this.name = this.constructor.name;

this.code = code;
this.codespace = codespace;
this.log = log;
Expand Down
Loading