Hi all,
I am building a flow where I would like to require a specific content-type in the http header.
If I build an expression which checks the content-type, it works fine if the header exists, but if it *does not* exist, the flow the fails with "invalid template" because the triggeroutputs()['headers']['content-type'] does not exist. HTTP 500 is returned with "bad gateway", but I want the flow to fail more gracefully instead (return HTTP 415 - Unsupported media type to the client).
I tried to catch this error by setting a variable to the Content-Type and then different "Run after" actions but the flow does not reach that point, the invalid template error just terminates the flow.
Does anyone know a way that I can trap this error and prevent the flow failing?
Thanks!