What’s Changed
We have a couple fixes and some improvements to errors in this release.
Fixes
- Fixed an issue where
read_state
polling requests would fail after the initial expiry, but before the request was processed- This was an edge case for subnets under high load. The
read_state
is allowed to use a fresh ingress_expiry, sopollForResponse
andretry
logic now uses this pattern
- This was an edge case for subnets under high load. The
- Added a check to handle a regression when calling the management canister using the new sync_call flow
Error handling
-
Fixed an issue where
reject_code
andreject_message
weren’t passed correctly to the error in synchronous callreject
ortrap
responses. -
new
ActorCallError
class -
AgentError
andActorCallError
supportinstanceof
checks, as well as aname
attribute that you can use for easier error handling- some old generic
Error
s are now labeled more preciesely
- some old generic
-
chore: Correct the typo in
agent/src/actor.ts
by @AlexV525 in chore: Correct the typo in `agent/src/actor.ts` by AlexV525 · Pull Request #939 · dfinity/agent-js · GitHub -
fix: trap and throw handling in v3 sync call by @krpeacock in fix: trap and throw handling in v3 sync call by krpeacock · Pull Request #940 · dfinity/agent-js · GitHub
-
fix: read state with fresh expiry by @krpeacock in fix: read state with fresh expiry by krpeacock · Pull Request #938 · dfinity/agent-js · GitHub
-
test: automatically deploys trap canister if it doesn’t exist yet dur… by @krpeacock in test: automatically deploys trap canister if it doesn't exist yet dur… by krpeacock · Pull Request #942 · dfinity/agent-js · GitHub
-
chore: skip range check when the certificate comes from the management canister by @dfx-json in chore: skip range check when the certificate comes from the management canister by dfx-json · Pull Request #945 · dfinity/agent-js · GitHub
-
feat: allow for setting HttpAgent ingress expiry using
ingressExpiryInMinutes
option by @krpeacock in feat: allow for setting HttpAgent ingress expiry using `ingressExpiryInMinutes` option by krpeacock · Pull Request #905 · dfinity/agent-js · GitHub -
feat: improved assertion options for agent errors by @krpeacock in feat: improved assertion options for agent errors by krpeacock · Pull Request #908 · dfinity/agent-js · GitHub
Full Changelog: Comparing v2.1.2...v2.1.3 · dfinity/agent-js · GitHub
All changes here: Release Release 2.1.3 · dfinity/agent-js · GitHub