(error: unknown)
| 68 | } |
| 69 | |
| 70 | function getErrorCode(error: unknown): string | undefined { |
| 71 | if (typeof error !== 'object' || error === null) return undefined |
| 72 | const maybeCode = Reflect.get(error, 'code') |
| 73 | return typeof maybeCode === 'string' ? maybeCode : undefined |
| 74 | } |
| 75 | |
| 76 | export const executionTools: Tool[] = [ |
| 77 | { |