googleapis / nodejs-storage

Node.js client for Google Cloud Storage: unified object storage for developers and enterprises, from live data serving to data analytics/ML to data archiving.
https://cloud.google.com/storage/
Apache License 2.0
896 stars 370 forks source link

fix: error serialization in resumable-upload.ts #2493

Closed eagleeye closed 2 months ago

eagleeye commented 3 months ago

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:

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

conventional-commit-lint-gcf[bot] commented 3 months ago

🤖 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/

ddelgrosso1 commented 2 months ago

Thank you for the contribution @eagleeye