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

feat: expose boundary node http headers to calls #736

Merged
merged 6 commits into from
Jul 11, 2023

Conversation

keplervital
Copy link
Member

@keplervital keplervital commented Jul 7, 2023

Description

This PR extens the query and call method responses to include the boundary node http headers. Moreover, it introduces a new method to the actor creation that enriches the provide type to include the http details of call.

How Has This Been Tested?

  • http calls responses are tested with snapshots
  • requestAndRetry logic is validated by using a custom error type AgentHTTPResponseError
  • actor interface is tested by mocking the pollForResponse and testing that both createActor and createActorWithHttpDetails return the same decoded response and that the later also includes the expected httpDetails
  • Linked locally with the service worker and manually validated the integration

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.

@keplervital keplervital requested a review from a team as a code owner July 7, 2023 14:15
docs/generated/changelog.html Outdated Show resolved Hide resolved
packages/agent/src/agent/api.ts Show resolved Hide resolved
packages/agent/src/actor.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@dfx-json dfx-json left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you @keplervital !

@dfx-json dfx-json merged commit bd2ab1d into dfinity:main Jul 11, 2023
14 checks passed
@dfx-json dfx-json mentioned this pull request Jul 12, 2023
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.

None yet

3 participants