API reference
@searsuite/sear-foundation-error
Structured public errors with stable codes and diagnostic details.
2 exportsderived from source
- classSearErrorsource ↗
-
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.constructorconstructor SearError(message: string, details?: SearErrorDetails, options?: ErrorOptions): SearErrorCreates a SearError instance.
message: stringdetails: SearErrorDetailsoptions: ErrorOptions
propertycode readonly code: stringStable machine-readable identifier for this error category.
propertydetails readonly details: SearErrorDetailsmethodreport 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
- typeSearErrorDetailssource ↗
-
type SearErrorDetails = Readonly<Record<string, unknown>>Machine-readable context attached to framework errors.
No public exports match that search.