4irbnb

Replicating airbnb following the atomic design principles...

View the Project on GitHub kokiebisu/4irbnb

Home > @nextbnb/common > BaseError

BaseError class

Blueprint for the BaseError which will be extended by other specific errors

Signature:

export declare class BaseError extends Error 

Extends: Error

Example

const error = new BaseError({ message: 'There is a base error!', statusCode: 400 })
error.get()

Constructors

Constructor Modifiers Description
(constructor)({ message, statusCode })   Constructs a new instance of the BaseError class

Properties

Property Modifiers Type Description
message   string  
status   string  
statusCode   THttpStatus  

Methods

Method Modifiers Description
get()