[99s-extend] cowboy and handling exceptions

Loïc Hoguin essen at ninenines.eu
Wed Jan 14 18:49:39 CET 2015


I don't know, there is no such thing in Cowboy. :-)

On 01/14/2015 05:45 PM, Stefan Strigler wrote:
> Hey there,
>
> 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
>
> throw({error, timeout})
>
> 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).
>
> Thanks for any hints,
>
> Steve
>
>
> _______________________________________________
> Extend mailing list
> Extend at lists.ninenines.eu
> https://lists.ninenines.eu/listinfo/extend
>

-- 
Loïc Hoguin
http://ninenines.eu


More information about the Extend mailing list