Fixes the status codes ordering in typescript definitions#1279
Merged
sampajano merged 1 commit intogrpc:masterfrom Sep 19, 2022
chandraaditya:master
Merged
Fixes the status codes ordering in typescript definitions#1279sampajano merged 1 commit intogrpc:masterfrom chandraaditya:master
sampajano merged 1 commit intogrpc:masterfrom
chandraaditya:master
Conversation
in the grpc-web package the status codes are in the wrong order causing them to be interpreted differently, so when comparing status codes that we get from a service it is not the same, this commit fixes that
|
|
sampajano
approved these changes
Sep 19, 2022
Collaborator
sampajano
left a comment
There was a problem hiding this comment.
Thanks so much for fixing this! I can't believe this was only caught now.. 😅
I think this was a bug introduced in #1139, where i updated StatusCode from a namespace to an enum.
I wish we could have a test to catch/verify this, but i don't think we have any e2e TS test yet. Will keep that in mind to add it later.
Thanks so much for the fix again!
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In the grpc-web package the status codes are in the wrong order causing them to be interpreted differently, so when comparing status codes that we get from a service it is not the same, this commit fixes that.
This ordering is causing misinterpretation of error codes:

Correct ordering as per gRPC specs:

This fixes issue #1243