Bump artifact dependencies if CODEQL_ACTION_ARTIFACT_V2_UPGRADE enabled (#2482)
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com> Co-authored-by: Henry Mercer <henrymercer@github.com>
This commit is contained in:
parent
cf5b0a9041
commit
a196a714b8
5388 changed files with 2176737 additions and 71701 deletions
32
node_modules/@protobuf-ts/runtime-rpc/build/es2015/rpc-error.js
generated
vendored
Normal file
32
node_modules/@protobuf-ts/runtime-rpc/build/es2015/rpc-error.js
generated
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/**
|
||||
* An error that occurred while calling a RPC method.
|
||||
*/
|
||||
export class RpcError extends Error {
|
||||
constructor(message, code = 'UNKNOWN', meta) {
|
||||
super(message);
|
||||
this.name = 'RpcError';
|
||||
// see https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-2.html#example
|
||||
Object.setPrototypeOf(this, new.target.prototype);
|
||||
this.code = code;
|
||||
this.meta = meta !== null && meta !== void 0 ? meta : {};
|
||||
}
|
||||
toString() {
|
||||
const l = [this.name + ': ' + this.message];
|
||||
if (this.code) {
|
||||
l.push('');
|
||||
l.push('Code: ' + this.code);
|
||||
}
|
||||
if (this.serviceName && this.methodName) {
|
||||
l.push('Method: ' + this.serviceName + '/' + this.methodName);
|
||||
}
|
||||
let m = Object.entries(this.meta);
|
||||
if (m.length) {
|
||||
l.push('');
|
||||
l.push('Meta:');
|
||||
for (let [k, v] of m) {
|
||||
l.push(` ${k}: ${v}`);
|
||||
}
|
||||
}
|
||||
return l.join('\n');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue