(metadata?: SessionUserErrorMetadata)
| 311 | } |
| 312 | |
| 313 | export function formatUserErrorMetadata(metadata?: SessionUserErrorMetadata): string | null { |
| 314 | if (!metadata) { |
| 315 | return null; |
| 316 | } |
| 317 | const parts: string[] = []; |
| 318 | if (metadata.category) { |
| 319 | parts.push(metadata.category); |
| 320 | } |
| 321 | if (metadata.message) { |
| 322 | parts.push(`message=${metadata.message}`); |
| 323 | } |
| 324 | if (metadata.details && Object.keys(metadata.details).length > 0) { |
| 325 | parts.push(`details=${JSON.stringify(metadata.details)}`); |
| 326 | } |
| 327 | return parts.length > 0 ? parts.join(' | ') : null; |
| 328 | } |
| 329 | |
| 330 | export function buildReattachLine(metadata: SessionMetadata): string | null { |
| 331 | if (!metadata.id) { |
no outgoing calls
no test coverage detected