(input: AuthToolFailureInput)
| 69 | }; |
| 70 | |
| 71 | export const authToolFailure = <T = never>(input: AuthToolFailureInput): ToolResult<T> => { |
| 72 | const error: ToolError = { |
| 73 | code: input.code, |
| 74 | message: input.message, |
| 75 | retryable: false, |
| 76 | ...(input.status !== undefined ? { status: input.status } : {}), |
| 77 | details: { |
| 78 | category: "authentication", |
| 79 | ...(input.integration ? { integration: input.integration } : {}), |
| 80 | ...(input.credential ? { credential: input.credential } : {}), |
| 81 | ...(input.upstream ? { upstream: input.upstream } : {}), |
| 82 | recovery: authRecovery(input.code, input.recovery), |
| 83 | }, |
| 84 | }; |
| 85 | return ToolResult.fail(error); |
| 86 | }; |
no test coverage detected