In some instances we need a smart action that returns some extra information when it fails. Currently it only seems possible to send a response with status 400 and a single error message.
Example (sending an error message with an inline screenshot):
return res.send({
html: `${json.result.error}${img}`,
error: 'Oops! Something went wrong...',
});
Expected behavior
This should display an error flash message and display the HTML output like it does with success responses that contain HTML.
Actual behavior
It only shows the error flash message, and not the HTML output.