(id: string, label: string)
| 46 | * contain slashes, dots, or other special characters. |
| 47 | */ |
| 48 | export function validateBridgeId(id: string, label: string): string { |
| 49 | if (!id || !SAFE_ID_PATTERN.test(id)) { |
| 50 | throw new Error(`Invalid ${label}: contains unsafe characters`) |
| 51 | } |
| 52 | return id |
| 53 | } |
| 54 | |
| 55 | /** Fatal bridge errors that should not be retried (e.g. auth failures). */ |
| 56 | export class BridgeFatalError extends Error { |
no outgoing calls
no test coverage detected