Http Code or Error Code on Node & WorkFlow Level

We have seen that if there are any error occurs on node and workflow level, there are no proper http codes so we can identify the cause of the error.
We have debug the WorkFlowExecute.ts class and found out that if any error occurred on node level it comes into the cache block and executionError will be populated.

Hey @aashish.jain, I am not fully sure what you’re asking here I am afraid. Would you like to see a different error handling in n8n? If so, could you describe what exactly you are missing?

@MutedJam Error handling is not an issue, the issue is with proper error we are not getting Http codes,
e.g If my Http request nod failed it throws error but without Http code.

Hey @aashish.jain,

Is this with the HTTP Request node or something you have noticed with all nodes? If the node or workflow has an internal error it seems likely that it would be unrelated to an HTTP response code but it could happen.

There is an option on the HTTP Request node so that you can get the full response which could help in some cases, Do you have an example workflow that throws an error like what you are seeing?

@jon this is for all the nodes, As I have checked the code If the error is of type “NodeAPIError” then only Http code is maintained in the code, but let say I’m connecting with my micro-service with HttpNode and if my service is down it throws the error “Connection Refused with Http Status Rejected” but in the other scenario like success or other error comes it does not maintain any httpcode