Show error if HTTP request fails

I have a form that triggers a logic flow. That logic flow sends an HTTP request. It all works fine.

But how do I show an error in the form if the API returns an error?

Also when testing the API (using ‘Run test to complete setup’) it wrongly says that the API returned 200 OK whereas it actually returns 4xx or even 500.

Logic’s form-triggered flows do not have any means to return a result, or to handle that result in the form. I generally use Make .com, n8n or Pipedream for automations that need to return information.