mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-05 10:14:30 +00:00
reportApiError centralizes the HyperframesApiError -> Error -> String reporting cascade for the cloud subverbs, including the curated ERROR_CODE_HINTS table and its priority order (code-specific hint > caller suggestion > bare code label > no third line). That priority logic was previously untested; the module comment notes a past regression where hyperframes_render_not_found was unreachable from get/delete. Add errors.test.ts covering: 404 + notFound short-circuit, known-code hint, hint-wins-over-suggestion priority, suggestion fallback, bare code label, no-third-line, extraHints merge and override, plain Error, and non-Error stringification. Mocks errorBox and process.exit following the sibling cloud/parsing.test.ts pattern. Co-authored-by: Carlos Alcaraz <193642530+calcarazgre646@users.noreply.github.com>