Can I access an error response from a previous step?

I want to handle any possible error that might happen in a particular step with some logic. But I can’t seem to access the error object that’s output.

I set up a test flow with a step that fails (on purpose) and produces this output:

{"response":{"status":404,"body":{"error":"Not Found"}}

Can I set up a branch step that can determine if the previous step failed? Can I access this error object in a subequent step?

Hi @paulrudy

I am not quit sure, I would use “continue on failure” and make it fail and then check if it appears in the branch selector.

1 Like

Hi @abuaboud thanks. Unfortunately, only successful results show in the branch selector. So with a script step:

export const code = async (inputs) => {
  return 'foo';
};

a subsequent branch can successfully select the foo result in setup (as expected).

But with

export const code = async (inputs) => {
  throw new Error('bar');
};

the branch selector only shows the previously successful test result: foo, and no mention of an error.

Error results would be helpful to have, to pass on and process from HTTP requests in case of error