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
* feat(code): allow any code type
Change Code(...) to accept any and Code() to return any.
Update docs/tests for int and string codes.
Fix stacktrace path normalization in module mode.
BREAKING CHANGE: OopsError.Code() now returns any (was string).
* refactor(code): extract getDeepestErrorCode
---------
Co-authored-by: Andy <>
|`.With(string, any)`|`err.Context() map[string]any`| Supply a list of attributes key+value. Values of type `func() any {}` are accepted and evaluated lazily. |
183
183
|`.WithContext(context.Context, ...any)`|`err.Context() map[string]any`| Supply a list of values declared in context. Values of type `func() any {}` are accepted and evaluated lazily. |
184
-
|`.Code(string)`|`err.Code() string`| Set a code or slug that describes the error. Error messages are intended to be read by humans, but such code is expected to be read by machines and be transported over different services |
184
+
|`.Code(any)`|`err.Code() any`| Set a code or slug that describes the error. Error messages are intended to be read by humans, but such code is expected to be read by machines and be transported over different services |
185
185
|`.Public(string)`|`err.Public() string`| Set a message that is safe to show to an end user |
186
186
|`.Time(time.Time)`|`err.Time() time.Time`| Set the error time (default: `time.Now()`) |
187
187
|`.Since(time.Time)`|`err.Duration() time.Duration`| Set the error duration |
0 commit comments