https://kotlinlang.org logo
Title
d

dave

09/23/2020, 1:06 PM
Erm no there isn't one actually. we use a custom version of CatchAll.
c

Cosmin Victor Celea

09/23/2020, 1:14 PM
it seems that if an exception is produced without being caught, then it never reaches that filter, or am i doing something wrong?
d

dave

09/23/2020, 1:21 PM
Thanks doesn't sound right. Are you sure there isn't a normal http response being returned with the stack in?
c

Cosmin Victor Celea

09/23/2020, 1:22 PM
return ServerFilters.InitialiseRequestContext(contexts)
    .then(ServerFilters.Cors(CorsPolicy.UnsafeGlobalPermissive))
    .then(throttleFilter(contexts)).then(CustomServerFilters.CatchAll())
    .then(app)
if a error is being thrown in the throttleFilter
then it never arrives also in the CustomServerFilters.CatchAll())
d

dave

09/23/2020, 1:24 PM
That's because the ordering of your filters is wrong 🤣
CatchAll should always be at the top of the stack
c

Cosmin Victor Celea

09/23/2020, 1:26 PM
👍