Documentation / @zerotal/core / index / ZerotalError
Class: ZerotalError
Defined in: errors/ZerotalError.ts:15
Base class for all framework errors.
Param
code
Stable machine-readable identifier (e.g. E_BINDING_NOT_FOUND),
safe to switch on; unlike the message, it is not meant to change.
Param
status
HTTP status to respond with when this error reaches the handler.
Param
context
Structured detail attached to logs and error pages.
Extends
Error
Extended by
StorageErrorHttpErrorConfigErrorBindingNotFoundErrorContainerLockedErrorLockNotAcquiredErrorUrlKeyMissingErrorHttpClientErrorEnvSchemaErrorConfigValidationErrorCryptKeyMissingErrorDecryptionErrorSocialErrorBroadcastErrorCacheErrorCircuitBreakerOpenErrorApiClientErrorValidationErrorI18nErrorInertiaErrorNotificationErrorNPlusOneErrorMigrationErrorModelNotFoundErrorRelationNotLoadedErrorStateErrorTransactionErrorUnsupportedDialectErrorQueueErrorSessionErrorTenancyConfigErrorNoActiveTenantErrorTenantStoragePathErrorPrecognitionResponseErrorValidationRedirectErrorValidationJsonError
Constructors
Constructor
new ZerotalError(
message,code,status?,context?):ZerotalError
Defined in: errors/ZerotalError.ts:16
Parameters
message
string
code
string
status?
number = 500
context?
Record<string, unknown>
Returns
ZerotalError
Overrides
Error.constructor
Properties
code
readonlycode:string
Defined in: errors/ZerotalError.ts:18
status
readonlystatus:number=500
Defined in: errors/ZerotalError.ts:19
context?
readonlyoptionalcontext?:Record<string,unknown>
Defined in: errors/ZerotalError.ts:20