Skip to content

Commit 267e8bf

Browse files
committed
test(agent-bff): document the deliberate non-string html cast
1 parent 20b2eb4 commit 267e8bf

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

packages/agent-bff/test/action/action-routes-middleware.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,8 @@ describe('action execute', () => {
695695
it('omits details when the action Error html is not a string', async () => {
696696
const form = makeAction({
697697
execute: jest.fn(async () => {
698+
// The double cast is deliberate: ActionFormValidationError.html is typed string, but the
699+
// agent-client builds it from an unchecked JSON cast, so the runtime value can be anything.
698700
throw new ActionFormValidationError('Refund failed', { evil: 1 } as unknown as string);
699701
}),
700702
});

0 commit comments

Comments
 (0)