Skip to content

Error message in Node.js console is not the orignial error message #170

@lborgman

Description

@lborgman

Environment details

  • OS: Windows 10
  • Node.js version: v8.9.4
  • npm version: 5.8.0
  • @google-cloud/storage version:

Steps to reproduce

  1. Not quite sure since I seem to have done something wrong. Anyway this is more general. I am using Formidable to try to upload an audio file to a gcs bucket. For some reason @Google-Cloud tries to parse this as JSON. That is probably my fault and not the issue here.

The issue is the error message in the console from the local Firebase web server. I get the error

"ApiError: Error during request."

This is not very helpful, of course :-(
Fortunately you can get a trace with "console.log". The error is thrown in

functions\node_modules@google-cloud\storage\node_modules@google-cloud\common\src\util.js:193:32

and this line looks like this:

  parsedHttpRespBody.err = new util.ApiError('Cannot parse JSON response');

I think it would be much easier for a developer if this error was made visible directly (instead of " ApiError: Error during request").

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the googleapis/nodejs-storage API.priority: p2Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions