export class RequestError extends Error { constructor( message: string, public readonly type: 'Cancel' | 'ValidationError' | 'AxiosError' | 'OtherError', public readonly cause?: unknown, public readonly response?: { data?: TData; status?: number }, ) { super(message) this.name = 'RequestError' } }