refactor(core): Separate API response from error in execution error causes (no-changelog) (#7880)

Store the third-party API response error separately from the error
stored as `cause`

Follow-up to:
https://github.com/n8n-io/n8n/pull/7820#discussion_r1406009154
This commit is contained in:
Iván Ovejero
2023-11-30 14:44:10 +01:00
committed by GitHub
parent b024cc52e7
commit e0b7f89035
8 changed files with 56 additions and 33 deletions

View File

@@ -88,7 +88,7 @@ describe('Execute Stop and Error Node', () => {
const stopAndError1RunData = result.data.resultData.runData['Stop and Error1'];
const stopAndError1Object = (
(stopAndError1RunData as unknown as IDataObject[])[0].error as IDataObject
).cause;
).errorResponse;
expect(stopAndError1Object).toEqual({
code: 404,