(error: unknown)
| 21383 | } |
| 21384 | |
| 21385 | function formatErrorMessage(error: unknown): string { |
| 21386 | if (error instanceof Error && error.message) { |
| 21387 | return error.message; |
| 21388 | } |
| 21389 | const fallback = String(error ?? '').trim(); |
| 21390 | return fallback || 'Unknown error'; |
| 21391 | } |
| 21392 | |
| 21393 | function resolveInternalCodexNativeApiBaseUrl(env: NodeJS.ProcessEnv): string | null { |
| 21394 | const explicitBaseUrl = normalizeEnvString(env.CODEXBRIDGE_INTERNAL_NATIVE_API_BASE_URL); |