-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): Add check that queue is defined and remove cyclic dependen…
…cy (#7404) In a rare edge case an undefined queue could be returned - this should not happen and now an error is thrown. Also using the opportunity to remove a cyclic dependency from the Queue.
- Loading branch information
1 parent
609f083
commit 45f2ef3
Showing
5 changed files
with
49 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { BINARY_ENCODING, type IDataObject, type IExecuteResponsePromiseData } from 'n8n-workflow'; | ||
|
||
export function decodeWebhookResponse( | ||
response: IExecuteResponsePromiseData, | ||
): IExecuteResponsePromiseData { | ||
if ( | ||
typeof response === 'object' && | ||
typeof response.body === 'object' && | ||
(response.body as IDataObject)['__@N8nEncodedBuffer@__'] | ||
) { | ||
response.body = Buffer.from( | ||
(response.body as IDataObject)['__@N8nEncodedBuffer@__'] as string, | ||
BINARY_ENCODING, | ||
); | ||
} | ||
|
||
return response; | ||
} |