Skip to content

fix(connect-web-interceptor): connect v2 compatibility#179

Open
Léni (legau) wants to merge 1 commit into
SafetyCulture:masterfrom
legau:master
Open

fix(connect-web-interceptor): connect v2 compatibility#179
Léni (legau) wants to merge 1 commit into
SafetyCulture:masterfrom
legau:master

Conversation

@legau

Copy link
Copy Markdown

Summary

In Connect v2, messages are plain JSON objects so there are no method classes on them anymore. This PR adds JSON serialization in both ways.

Problem description

Using Connect v2 with grpc-web-devtools causes this error :

ConnectError: [unknown] req.message.toJson is not a function

Checklist

  • Is this PR a reasonable size?
  • For breaking changes: I have confirmed that other repos are not affected, or I have planned a deployment sequence to address any impact.

Code Review Guidelines for Reviewers

  • Try to review in a timely manner. Opinions/nitpicks should not be blockers. Pair on a call for non-trivial feedback.
  • Overall design and approach should follow established patterns. Don't try to make the PR perfect.
  • Try to identify edge cases, race conditions, over-engineering, lack of test coverage and complexity.
  • If you don't feel qualified to review the code, pass it on to someone who is.

@aleksator

Copy link
Copy Markdown

I’ve built the extension with this patch applied and can confirm it works correctly with Connect v2.
Would it be possible to merge and include this in the next release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants