Interface BaseServiceError

The base interface for all service-related errors.

interface BaseServiceError {
    code: number;
    details?: any[];
    message: string;
    path?: (string | number)[];
    type: string;
}

Properties

code: number

The HTTP status code.

details?: any[]

Optional details about the error. Not available in production.

message: string

A message explaining what went wrong, suitable for showing to end users.

path?: (string | number)[]

The path to the part of the request that caused the error.

["body", "user", "email"]
type: string

The type of the error (e.g., "ValidationError", "NotFoundError").