mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(core): Ensure status on Axios errors is available to the BE (#9015)
This commit is contained in:
@@ -848,6 +848,11 @@ export async function proxyRequestToAxios(
|
||||
error.message = `${response.status as number} - ${JSON.stringify(responseData)}`;
|
||||
throw Object.assign(error, {
|
||||
statusCode: response.status,
|
||||
/**
|
||||
* Axios adds `status` when serializing, causing `status` to be available only to the client.
|
||||
* Hence we add it explicitly to allow the backend to use it when resolving expressions.
|
||||
*/
|
||||
status: response.status,
|
||||
error: responseData,
|
||||
response: pick(response, ['headers', 'status', 'statusText']),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user