Skip to content

Commit

Permalink
changing condition for handling error responses
Browse files Browse the repository at this point in the history
  • Loading branch information
krpeacock committed Oct 22, 2024
1 parent 1502ed3 commit 9142734
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/agent/src/actor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ function _createActorMethod(
);
}
}
} else if (!response.ok || response.body /* IC-1462 */) {
} else if (response.body && 'reject_message' in response.body) {
// handle v2 response errors by throwing an UpdateCallRejectedError object
const { reject_code, reject_message, error_code } = response.body as v2ResponseBody;
throw new UpdateCallRejectedError(
Expand Down

0 comments on commit 9142734

Please sign in to comment.