node_modules/@grpc/grpc-js/src/call.ts:82:17
callErrorFromStatus
export function callErrorFromStatus(
status: StatusObject,
callerStack: string
): ServiceError {
const message = `${status.code} ${Status[status.code]}: ${status.details}`;
const error = new Error(message);
const stack = `${error.stack}\nfor call at\n${callerStack}`;
return Object.assign(new Error(message), status, { stack });
}
export class ClientUnaryCallImpl
node_modules/@grpc/grpc-js/src/client.ts:360:55
Object.onReceiveStatus
} else {
callProperties.callback!(null, responseMessage);
}
} else {
const callerStack = getErrorStackString(callerStackError!);
callProperties.callback!(callErrorFromStatus(status, callerStack));
}
/* Avoid retaining the callerStackError object in the call context of
* the status event handler. */
callerStackError = null;
emitter.emit('status', status);
node_modules/@grpc/grpc-js/src/client-interceptors.ts:458:34
Object.onReceiveStatus
},
onReceiveStatus: (status: StatusObject) => {
if (!receivedMessage) {
listener?.onReceiveMessage?.(null);
}
listener?.onReceiveStatus?.(status);
},
};
super.start(metadata, wrapperListener);
this.call.startRead();
}
node_modules/@grpc/grpc-js/src/client-interceptors.ts:419:48
Object.onReceiveStatus
},
onReceiveStatus: status => {
if (readError) {
interceptingListener?.onReceiveStatus?.(readError);
} else {
interceptingListener?.onReceiveStatus?.(status);
}
},
});
}
startRead() {
node_modules/@grpc/grpc-js/src/resolving-call.ts:163:24
filteredStatus.details +
'"'
);
this.statusWatchers.forEach(watcher => watcher(filteredStatus));
process.nextTick(() => {
this.listener?.onReceiveStatus(filteredStatus);
});
}
}
private sendMessageOnChild(context: MessageContext, message: Buffer): void {
node:internal/process/task_queues:77:11
processTicksAndRejections
node_modules/@grpc/grpc-js/src/client.ts:325:42
ServiceClientImpl.makeUnaryRequest
* before calling the CallInvocationTransformer, and we need to create the
* call after that. */
emitter.call = call;
let responseMessage: ResponseType | null = null;
let receivedStatus = false;
let callerStackError: Error | null = new Error();
call.start(callProperties.metadata, {
onReceiveMetadata: metadata => {
emitter.emit('metadata', metadata);
},
// eslint-disable-next-line @typescript-eslint/no-explicit-any
node_modules/@grpc/grpc-js/src/make-client.ts:189:15
ServiceClientImpl.<anonymous>
serialize: Function,
deserialize: Function
): Function {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return function (this: any, ...args: any[]) {
return fn.call(this, path, serialize, deserialize, ...args);
};
}
export interface GrpcObject {
[index: string]:
node_modules/@google-cloud/secret-manager/build/src/v1/secret_manager_service_client.js:231:29
const callPromise = this.secretManagerServiceStub.then(stub => (...args) => {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
const func = stub[methodName];
return func.apply(stub, args);
}, (err) => () => {
throw err;
});
const descriptor = this.descriptors.page[methodName] || undefined;
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
node_modules/google-gax/build/src/normalCalls/timeout.js:44:16
const options = otherArgs.options || {};
options.deadline = new Date(now.getTime() + timeout);
const metadata = otherArgs.metadataBuilder
? otherArgs.metadataBuilder(abTests, otherArgs.headers || {})
: null;
return func(argument, metadata, options, callback);
};
}
//# sourceMappingURL=timeout.js.map
node_modules/google-gax/build/src/normalCalls/retries.js:82:25
repeat
return;
}
retries++;
let lastError = err;
const toCall = (0, timeout_1.addTimeoutArg)(func, timeout, otherArgs);
canceller = toCall(argument, (err, response, next, rawResponse) => {
// Save only the error before deadline exceeded
if (err && err.code !== 4) {
lastError = err;
}
if (!err) {
node_modules/google-gax/build/src/normalCalls/retries.js:125:13
'in backoffSettings.');
error.code = status_1.Status.INVALID_ARGUMENT;
callback(error);
}
else {
repeat();
}
return {
cancel() {
if (timeoutId) {
clearTimeout(timeoutId);
node_modules/google-gax/build/src/call.js:67:27
OngoingCallPromise.call
*/
call(func, argument) {
if (this.completed) {
return;
}
const canceller = func(argument, (err, response, next, rawResponse) => {
this.completed = true;
setImmediate(this.callback, err, response, next, rawResponse);
});
if (canceller instanceof Promise) {
canceller.catch(err => {
node_modules/google-gax/build/src/normalCalls/normalApiCaller.js:34:19
NormalApiCaller.call
}
wrap(func) {
return func;
}
call(apiCall, argument, settings, canceller) {
canceller.call(apiCall, argument);
}
fail(canceller, err) {
canceller.callback(err);
}
result(canceller) {
node_modules/google-gax/build/src/createApiCall.js:112:30
return (0, timeout_1.addTimeoutArg)(func, thisSettings.timeout, thisSettings.otherArgs);
})
.then((apiCall) => {
// After adding retries / timeouts, the call function becomes simpler:
// it only accepts request and callback.
currentApiCaller.call(apiCall, request, thisSettings, ongoingCall);
})
.catch(err => {
currentApiCaller.fail(ongoingCall, err);
});
// Calls normally return a "cancellable promise" that can be used to `await` for the actual result,