Skip to content
This repository was archived by the owner on Mar 17, 2026. It is now read-only.
This repository was archived by the owner on Mar 17, 2026. It is now read-only.

Expose PublishError #1215

@pkuczynski

Description

@pkuczynski

PublishError class is not exported by the package. This blocks developer from pointing using it as a type for method signature in typescript:

What I would like to achieve is:

import { PublishError } from '@google-cloud/pubsub'

export const onError = (error: PublishError): void => {
   ...
}

Currently, I can only achieve this by importing from module src, which is not ideal...

import { PublishError } from '@google-cloud/pubsub/build/src/publisher/publish-error'

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: pubsubIssues related to the googleapis/nodejs-pubsub 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