mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor: Setup node context API, and consolidate code between Webhook and Wait nodes (no-changelog) (#6464)
This commit is contained in:
committed by
GitHub
parent
29882a6f39
commit
4c854f4f23
13
packages/nodes-base/nodes/Webhook/error.ts
Normal file
13
packages/nodes-base/nodes/Webhook/error.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user