test(tools): fix error code assertions for collapsed call tests
The error code lives on ToolFailure.info.code, not ToolFailure.code.
This commit is contained in:
@@ -1574,7 +1574,7 @@ describe('the run_code dispatch bridge', () => {
|
||||
})
|
||||
expect(result.isError).toBe(true)
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- error is a union type
|
||||
expect((result.error as any).code).toBe('UNKNOWN_TOOL')
|
||||
expect((result.error as any).info.code).toBe('UNKNOWN_TOOL')
|
||||
})
|
||||
|
||||
it('routes a pre-aborted collapsed call through ABORTED_BEFORE_DISPATCH', async () => {
|
||||
@@ -1592,7 +1592,7 @@ describe('the run_code dispatch bridge', () => {
|
||||
})
|
||||
expect(result.isError).toBe(true)
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- error is a union type
|
||||
expect((result.error as any).code).toBe(TOOL_ABORTED_BEFORE_DISPATCH)
|
||||
expect((result.error as any).info.code).toBe(TOOL_ABORTED_BEFORE_DISPATCH)
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user