<div dir="ltr">Hey there,<div><br></div><div>maybe I'm missing the obvious. What I want to do is add some generic handler for exception handling. Say we have a set of resources some of which delegating stuff to external, other services. These calls might result in a</div><div><br></div><div>throw({error, timeout})</div><div><br></div><div>for instance. How would I add/modify cowboy's middleware (right place?) to handle those (known) exception and return a custom error (like 504 - Gateway Timeout).</div><div><br></div><div>Thanks for any hints,</div><div><br></div><div>Steve</div></div>