@searsuite/sear-foundation-error
Structured public errors with stable codes and diagnostic details.
- classSearError
-
class SearError extends ErrorBase class for errors intentionally exposed by SearSuite packages.
Packages may throw this generic form while they do not need a more specific public error type. Domain-specific subclasses override
code.constructor SearError(message: string, details?: SearErrorDetails, options?: ErrorOptions): SearErrorproperty readonly code: stringStable machine-readable identifier for this error category.
property readonly details: SearErrorDetailsmethod report(): thisReports this error with a compact, styled console header and diagnostics. Returning the error keeps
throw new SearError(...).report()ergonomic.Inherited members 7
- cause
- message
- name
- stack
- stackTraceLimit
- captureStackTrace
- prepareStackTrace
- typeSearErrorDetails
-
type SearErrorDetails = Readonly<Record<string, unknown>>Machine-readable context attached to framework errors.
No matching API entries.