mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-13 16:14:07 -08:00
6fb8a9ee39
* ci: Fix linting (no-changelog) * lintfix for nodes-base as well
17 lines
388 B
TypeScript
17 lines
388 B
TypeScript
export class WebhookAuthorizationError extends Error {
|
|
constructor(
|
|
readonly responseCode: number,
|
|
message?: string,
|
|
) {
|
|
if (message === undefined) {
|
|
message = 'Authorization problem!';
|
|
if (responseCode === 401) {
|
|
message = 'Authorization is required!';
|
|
} else if (responseCode === 403) {
|
|
message = 'Authorization data is wrong!';
|
|
}
|
|
}
|
|
super(message);
|
|
}
|
|
}
|