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

file.delete returns a wrong value when the files doesn't exist #2182

@vicb

Description

@vicb

Environment details

  • OS: MacOs
  • Node.js version: v18.10.0
  • npm version: 8.19.2
  • @google-cloud/storage version: 6.9.5

Steps to reproduce

Try to delete a file that doesn't exists:

const response = await bucket.file('path/to/no/file').delete({ ignoreNotFound: true });

The response is:

[
  {
    error: {
      code: 404,
      message: 'No such object: airsp/tiles/10/100/601.pbf',
      errors: [Array]
    }
  },
  PassThrough {
    //...
  }
]

The first element of the array should not be here as the response is supposed to be a [r.Response]

delete(options?: DeleteOptions): Promise<[r.Response]>;

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the googleapis/nodejs-storage API.next major: breaking changethis is a change that we should wait to bundle into the next major versionpriority: p3Desirable enhancement or 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
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions