mirror of
https://github.com/nexu-io/openmotion.git
synced 2026-12-01 23:51:42 +08:00
* Recover transient cloud login and export failures and guide client updates * Run source update guidance regression in PR CI * Verify renderer failure causes from worker to telemetry sink --------- Co-authored-by: qindong <qindong@qindongs-MacBook-Pro.local>
9 lines
522 B
TypeScript
9 lines
522 B
TypeScript
import type { renderFailureReasons } from '../tracking/tool-fields.ts';
|
|
|
|
export function classifyRenderFailure(output: string): (typeof renderFailureReasons)[number] {
|
|
if (/listen (?:EPERM|EACCES).*?(?:127\.0\.0\.1|::1|localhost)/i.test(output)) return 'local_port_denied';
|
|
if (/Chrome cannot start|Failed to launch (?:the )?browser/i.test(output)) return 'browser_start';
|
|
if (/Error while opening encoder|Unknown encoder|Error initializing output stream/i.test(output)) return 'encoder';
|
|
return 'unclassified';
|
|
}
|