Skip to content

Commit

Permalink
Internal code sync (#1381)
Browse files Browse the repository at this point in the history
  • Loading branch information
sampajano authored Nov 8, 2023
1 parent 1ab0bdc commit db386b9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions javascript/net/grpc/web/rpcerror.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ class RpcError extends Error {
/** @type {!Metadata} */
this.metadata = metadata;
}

/** @override */
toString() {
const status = StatusCode.statusCodeName(this.code) || String(this.code);
let out = `RpcError(${status})`;
if (this.message) {
out += ': ' + this.message;
}
return out;
}
}

/** @override */
Expand Down

0 comments on commit db386b9

Please sign in to comment.