You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(browser): catch malformed URL TypeError and map to exit 5 VALIDATION_ERROR #276
In src/lib/browser.ts, openInBrowser(url) calls new URL(url) without a try/catch block. When passed a malformed URL string (e.g., "not a url"), Node.js throws an un-guarded TypeError: Invalid URL, crashing the process with exit code 1 instead of returning a typed VALIDATION_ERROR (exit code 5).
Proposed Fix
Wrap new URL(url) in a try/catch block and throw localValidationError('url', 'must be a valid http(s) URL', undefined, 'field').
changed the title [-]fix(browser): catch malformed URL TypeError and map to exit 5 VALIDATION_ERROR[/-][+][Hackathon] fix(browser): catch malformed URL TypeError and map to exit 5 VALIDATION_ERROR[/+]on Jul 24, 2026
changed the title [-][Hackathon] fix(browser): catch malformed URL TypeError and map to exit 5 VALIDATION_ERROR[/-][+]fix(browser): catch malformed URL TypeError and map to exit 5 VALIDATION_ERROR[/+]on Aug 5, 2026
Activity
sandman-sh commentedon Jul 22, 2026
/assign
testsprite-hob commentedon Jul 22, 2026
Assigned to @sandman-sh. Thanks for taking this on. (1 more slot available.)
Your open assigned issues (2/3):
[-]fix(browser): catch malformed URL TypeError and map to exit 5 VALIDATION_ERROR[/-][+][Hackathon] fix(browser): catch malformed URL TypeError and map to exit 5 VALIDATION_ERROR[/+][-][Hackathon] fix(browser): catch malformed URL TypeError and map to exit 5 VALIDATION_ERROR[/-][+]fix(browser): catch malformed URL TypeError and map to exit 5 VALIDATION_ERROR[/+]