Skip to content
This repository was archived by the owner on Jul 13, 2025. It is now read-only.
This repository was archived by the owner on Jul 13, 2025. It is now read-only.

Node.js: UnhandledPromiseRejection in createStub when keyfile path doesn't exist #2065

@jkwlui

Description

@jkwlui

Original issue googleapis/nodejs-text-to-speech#12

Promise rejection from createStub (due to missing auth keyfile, etc..) is not caught, causing UnhandledPromiseRejection warning:

// Put together the "service stub" for
// {@stub.fullyQualifiedType}.
var {@stub.name} = gaxGrpc.createStub(
protos.{@stub.fullyQualifiedType},
opts
);

We should .catch and process.exit when client fails to initialize.

Metadata

Metadata

Labels

priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.yoshi

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions