(context: string, error: unknown)
| 256 | * Logs errors for Ants only, always visible in production. |
| 257 | */ |
| 258 | export function logAntError(context: string, error: unknown): void { |
| 259 | if (process.env.USER_TYPE !== 'ant') { |
| 260 | return |
| 261 | } |
| 262 | |
| 263 | if (error instanceof Error && error.stack) { |
| 264 | logForDebugging(`[ANT-ONLY] ${context} stack trace:\n${error.stack}`, { |
| 265 | level: 'error', |
| 266 | }) |
| 267 | } |
| 268 | } |
| 269 |
no test coverage detected