You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Though agent-js declares error UpdateCallRejectedError, it cannot be caught in the wild, since initial http response from canister (always?) looks like this:
Describe the bug
Though agent-js declares error
UpdateCallRejectedError
, it cannot be caught in the wild, since initial http response from canister (always?) looks like this:And therefore if I write
throw Error.reject
orDebug.trap
in canister, it will be processed by polling and produce pure text error here:agent-js/packages/agent/src/polling/index.ts
Lines 68 to 73 in 8254c47
I believe instance of
UpdateCallRejectedError
should be thrown instead for more convenient error-handling in top-level applicationTo Reproduce
false
in console and check that error contains only plain text messageExpected behavior
UpdateCallRejectedError
instance should be caught with all the appropriate fields in it.The text was updated successfully, but these errors were encountered: