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: improved assertion options for agent errors #908

Merged
7 commits merged into from
Oct 23, 2024

Conversation

krpeacock
Copy link
Contributor

Description

Raised in #907, we can offer better assertion strategies for identifying different types of errors during runtime.

ActorCallError, QueryCallRejectedError, and UpdateCallRejectedError now

  • use setPrototypeOf during construction
  • expose and customize name
  • expose __proto__

Fixes #907

How Has This Been Tested?

New unit 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.

@krpeacock krpeacock requested a review from a team as a code owner July 22, 2024 23:28
Copy link
Contributor

github-actions bot commented Jul 22, 2024

size-limit report 📦

Path Size
@dfinity/agent 86.93 KB (-0.01% 🔽)
@dfinity/candid 13.58 KB (0%)
@dfinity/principal 4.97 KB (0%)
@dfinity/auth-client 61.04 KB (-0.03% 🔽)
@dfinity/assets 81.68 KB (-0.03% 🔽)
@dfinity/identity 58.15 KB (-0.05% 🔽)
@dfinity/identity-secp256k1 131.98 KB (+0.33% 🔺)

krpeacock and others added 6 commits July 22, 2024 16:36
@ghost ghost enabled auto-merge (squash) October 23, 2024 15:47
@ghost ghost merged commit b76cebc into main Oct 23, 2024
16 checks passed
@ghost ghost deleted the kai/agent-error-typechecking branch October 23, 2024 16:05
This pull request was closed.
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.

instanceof check for "ActorCallError"/"QueryCallRejectedError"/"UpdateCallRejectedError"
1 participant