GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Reading a nonexisting file succeeds · Issue #772 · googleapis/google-cloud-node

Reading a nonexisting file succeeds #772

New issue
Copy link
New issue
Copy link
Closed
Closed
Reading a nonexisting file succeeds#772
Copy link
Assignees
marekbiskup
Labels
coretype: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Description

@marekbiskup
marekbiskup
opened on Jul 31, 2015
Issue body actions

I tried to open an nonexisting file. It succeeded and gave me the following contents:

<?xml version='1.0' encoding='UTF-8'?><Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message></Error>

I'd prefer the function threw an exception of called 'error'.

My code

  var content = '';
  var readStream = bucket.file(data.name).createReadStream();
  readStream.on('data', function(buf) { content += buf.toString(); });
  readStream.on('end', function() {
    console.log("got file data: " + content);
  });
  readStream.on('error', function(err) {
    console.log("Error opening a gcs file " + data.name + ": " + err)
  });

output:
got file data: NoSuchKeyThe specified key does not exist.

EDIT: I actually also got an error message, see below.

Activity

Next
  1. marekbiskup commented on Jul 31, 2015

    @marekbiskup
    marekbiskup
    on Jul 31, 2015
    Author
    More actions

    Sorry, I must have overlooked the log message:

    Error opening a gcs file triggers/gcsfile-VjpUNk.json: Error: Error during request.
    

    So everything is fine. I'm just surprised I also got some content.
    This is probably FAD.

  2. marekbiskup
    closed this as completedon Jul 31, 2015
  3. stephenplusplus
    reopened this on Jul 31, 2015
  4. stephenplusplus commented on Jul 31, 2015

    @stephenplusplus
    stephenplusplus
    on Jul 31, 2015
    Contributor
    More actions

    Update - I originally posted an issue that turned out not to relate. I removed that to avoid the noise.

    I think this is worth taking a look at. Most likely, our universal request dispatcher needs some tweaking.

    Thanks for opening the issue!

  5. stephenplusplus
    added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    core
    on Jul 31, 2015
  6. callmehiphop
    closed this as completedin #776on Jul 31, 2015
  7. JustinBeckwith
    assigned
    marekbiskup
    on Feb 1, 2021
  8. sofisl
    added 5 commits that reference this issue on Jan 17, 2023

    fix(deps): update dependency natural to v2 (#772)

    33abc1b

    fix(deps): google-gax v2.17.0 with mTLS (#772)

    c0f29b8

    chore: release 4.5.3 (#769)

    e6aea04

    fix(deps): google-gax v2.17.0 with mTLS (#772)

    5ea46c3

    chore: release 4.5.3 (#769)

    1f2aacb
  9. miguelvelezsa
    added a commit that references this issue on Jul 23, 2025

    chore: update .eslintignore (#772)

    6b57794
  10. sofisl
    added a commit that references this issue on Jan 27, 2026

    build(node): run linkinator against index.html (#1227) (#772)

    ab9e53e
  11. 5 remaining items

  12. miguelvelezsa
    added a commit that references this issue on Jan 28, 2026

    chore: generate GAPIC metadata JSON file (#772)

    ef5461f
  13. sofisl
    added 4 commits that reference this issue on Jan 29, 2026

    build(node): run linkinator against index.html (#1227) (#772)

    c8e26b6

    build(node): run linkinator against index.html (#1227) (#772)

    9c78e50

    migrate code from googleapis/cloud-profiler-nodejs (#7087)

    288deb4

    chore: generate GAPIC metadata JSON file (#772)

    287dc85
  14. sofisl
    added a commit that references this issue on Feb 17, 2026

    chore: generate GAPIC metadata JSON file (#772)

    67634b6
  15. sofisl
    added 3 commits that reference this issue on Feb 24, 2026

    docs: update docs for system test (#772)

    b096a6f

    chore: release 3.0.4 (#772)

    f14adbd

    chore(deps): update dependency sinon to v8 (#772)

    53db6c5
  16. GautamSharda
    added a commit that references this issue on Mar 11, 2026

    fix(deps): pin @grpc/grpc-js to ^0.6.6 (#772)

    7cf1f4c
  17. thiyaguk09
    added a commit that references this issue on Mar 18, 2026

    chore: release 3.0.4 (googleapis#772)

    b69026f
  18. GautamSharda
    added 2 commits that reference this issue on Mar 23, 2026

    chore: add dev dependencies for cloud-rad ref docs (#772)

    baf220e

    chore: add dev dependencies for cloud-rad ref docs (#772)

    dc58de4
  19. shivanee-p
    added a commit that references this issue on Mar 27, 2026

    chore: add dev dependencies for cloud-rad ref docs (#772)

    f0c179e
  20. thiyaguk09
    added a commit that references this issue on May 5, 2026

    chore: add dev dependencies for cloud-rad ref docs (googleapis#772)

    6d9ebcc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @marekbiskup
    marekbiskup

Labels

coretype: 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

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.