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
[Feature]: Add .addNote() method to ErrorInstance #9
Implement the .addNote() method on the ErrorInstance type. This method enriches errors with additional context notes, inspired by Python 3.11's add_note() functionality.
Problem It Solves
Errors often need additional context discovered at runtime
Notes provide better debugging information without changing the core API
Enables rich error enrichment after catching
Proposed Solution
import{error,raise}from'@deessejs/errors';constAppError=error({name: 'AppError'});try{processData(input);}catch(err){raise(AppError().addNote('Processing failed at line 42'));}// Multiple notes supportedraise(AppError().addNote('Attempt 1 failed').addNote('Retrying...').addNote('Attempt 2 failed'));
Alternatives Considered
Type guards approach (deferred to v1.2.0)
Context injection via withContext() (deferred to v2.0.0)
Activity
fix(runtime): decouple validation from message, freeze factory metada…
fix(runtime): decouple validation from message, freeze factory metada…
fix(causes): single source of truth for cause, V8 stack capture
WIP: tighten type, validation, and causality contracts (audit respons…