Skip to content

getMetadata() for Session is not handling the promise #2123

@alkatrivedi

Description

@alkatrivedi

Unable to get the metadata for a Session using await instead of callback.

Error: TypeError: callback is not a function at callback!(err, resp);

Steps to reproduce -

const {Spanner} = require('@google-cloud/spanner'); const spanner = new Spanner({ projectId: projectId, }); const instance = spanner.instance(instanceId); const database = instance.database(databaseId); const session = await database.createSession(); const metadata = await session[0].getMetadata(); 

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: spannerIssues related to the googleapis/nodejs-spanner API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions