This repository was archived by the owner on Nov 18, 2025. It is now read-only.
fix: do not fail when decoding unknown error#1077
Merged
gcf-merge-on-green[bot] merged 1 commit intomasterfrom Aug 5, 2021
Merged
fix: do not fail when decoding unknown error#1077gcf-merge-on-green[bot] merged 1 commit intomasterfrom
gcf-merge-on-green[bot] merged 1 commit intomasterfrom
Conversation
fhinkel
approved these changes
Aug 5, 2021
JustinBeckwith
approved these changes
Aug 5, 2021
| const decodedDetail = this.decodeProtobufAny(detail); | ||
| details.push(decodedDetail); | ||
| } catch (err) { | ||
| // cannot decode detail, likely because of the unknown type - just skip it |
Contributor
There was a problem hiding this comment.
Is there any other way we could decode this information? Even if it's not pretty, giving the user some fighting chance to see what's returned, even a stringified object maybe, could be pretty nice.
Contributor
Author
There was a problem hiding this comment.
Users should still get a binary buffer, as before. We'll take a look how we can improve it, but for now let's just put out the fire :)
gcf-merge-on-green bot
pushed a commit
that referenced
this pull request
Aug 5, 2021
🤖 I have created a release \*beep\* \*boop\* --- ## [2.22.0](https://www.github.com/googleapis/gax-nodejs/compare/v2.21.1...v2.22.0) (2021-08-05) ### Features * use proto3 JSON serializer for REGAPIC workflows ([#1074](https://www.github.com/googleapis/gax-nodejs/issues/1074)) ([6ef89f1](https://www.github.com/googleapis/gax-nodejs/commit/6ef89f16fdc3bb09200dc048b4fa5e15d265e973)) ### Bug Fixes * do not fail when decoding unknown error ([#1077](https://www.github.com/googleapis/gax-nodejs/issues/1077)) ([90e19b1](https://www.github.com/googleapis/gax-nodejs/commit/90e19b19b5d84430f929c4f510f4775344669a6b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes googleapis/google-cloud-node-core#361.
google-gaxhas no way to know of all possible error protos, so we'll just skip and ignore those that cannot be decoded.