Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Make pollForResponse typesafe to avoid exceptions from unknown requests #958

Merged

Conversation

sea-snake
Copy link
Contributor

@sea-snake sea-snake commented Nov 28, 2024

  • Make pollForResponse typesafe to avoid exceptions from unknown requests
  • Change signed/transformed request typing from any to unknown
  • Remove redundant await where requestId method is used since the method isn't async

Description

Fixes issues with 3rd party Agent and or Identity implementations that didn't return a signed/transformed request in the shape that pollForResponse was expecting since the recent changes in 2.1.3

How Has This Been Tested?

See the automated unit and e2e tests, the pollForResponse implementation doesn't have a unit test but should be covered by the actor unit tests and e2e tests.

Checklist:

  • My changes follow the guidelines in CONTRIBUTING.md.
  • The title of this PR complies with Conventional Commits.
  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation.

- Change signed request typing from any to unknown
- Remove await where requestId method is used
@sea-snake sea-snake requested a review from a team as a code owner November 28, 2024 09:31
@sea-snake sea-snake marked this pull request as draft November 28, 2024 09:36
… Fix typing mismatch between delegation and requestId method.
@sea-snake sea-snake marked this pull request as ready for review November 28, 2024 10:14
@krpeacock krpeacock merged commit 54fe070 into dfinity:main Dec 9, 2024
16 checks passed
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