[99s-extend] cowboy and handling exceptions

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


I send too early...

I want to add a hook for when Cowboy receives exceptions in Cowboy 2, so 
at that point you will be able to do it. But nothing in current Cowboy.

On 01/14/2015 06:49 PM, Loïc Hoguin wrote:
> 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