Justin Dalrymple 031395bc5e
Removing native support for rejectUnauthorized - Suggest nodejs env NODE_TLS_REJECT_UNAUTHORIZED=0 instead (#3540)
This hasn't been supported for a while since it was implemented incorrectly. Further, using it is generally bad practice. If such functionality is required, the user can utilise one of the ENV s needed to bypass this check
2024-02-20 11:04:58 -05:00

39 lines
840 B
TypeScript

/* eslint-disable max-classes-per-file */
export class GitbeakerRequestError extends Error {
readonly cause?: {
description: string;
request: Request;
response: Response;
};
constructor(
message: string,
options?: {
cause?: {
description: string;
request: Request;
response: Response;
};
},
) {
super(message, options);
this.cause = options?.cause;
this.name = 'GitbeakerRequestError';
}
}
export class GitbeakerTimeoutError extends Error {
constructor(message: string, options?: ErrorOptions) {
super(message, options);
this.name = 'GitbeakerTimeoutError';
}
}
export class GitbeakerRetryError extends Error {
constructor(message: string, options?: ErrorOptions) {
super(message, options);
this.name = 'GitbeakerRetryError';
}
}