Class ClientErrorAbstract

Represents an abstract client-side error, typically for errors with status codes in the 4xx range.

This abstract class extends the ServiceError class and serves as a base for client-related errors such as validation errors, unauthorized access, or resource not found errors.

It provides a structure for handling errors caused by the client, and specific client error types (e.g., NotFoundError, UnauthorizedError) should extend this class.

ClientError

Hierarchy (view full)

Constructors

Properties

code: number

The HTTP status code or error code representing the type of error. Must be implemented by subclasses.

message: string
name: string
stack?: string
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void