nodejs-storage icon indicating copy to clipboard operation
nodejs-storage copied to clipboard

Fix error serialization in resumable-upload.ts

Open eagleeye opened this issue 1 year ago • 1 comments

Existing error handling has wrong error serialization with .toString(), that leads to [object Object] error messages. Example: Error: Retry limit exceeded - [object Object] at Upload.attemptDelayedRetry (/usr/src/app/node_modules/@google-cloud/storage/build/cjs/src/resumable-upload.js:818:26)

Better solution would be JSON.stringify the error

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • [ ] Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • [ ] Ensure the tests and linter pass
  • [ ] Code coverage does not decrease (if any source code was changed)
  • [ ] Appropriate docs were updated (if necessary)

the issue was discussed with Google Support via DoIT support team as a intermediate

eagleeye avatar Jul 05 '24 06:07 eagleeye

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot https://conventionalcommits.org/

Thank you for the contribution @eagleeye

ddelgrosso1 avatar Jul 08 '24 23:07 ddelgrosso1