Fork me on GitHub
#aleph
<
2019-07-21
>
geraldodev12:07:31

Hi, Why in this minimal case when the :status is 500 wrap-request throws an Exception java.lang.String cannot be cast to manifold.stream.core.IEventSource. Otherwise if I change the status to 200 the unhandled exception does not occur anymore.

dimovich19:07:44

@U0516053R btw, is it ok to wrap your server handler in a client middleware?

geraldodev20:07:46

I'm assuming that it is. The checking that I did was , http/post's middleware defaults do identity (so no middleware at the client by default). I assumed that it was like ring (plug middleware at server). But I didnt relate the word client with with that fact that It had to be used at client.

geraldodev06:07:11

@dimovich Thnx for pointing the rookie mystake. Very much appreciated.

ikitommi14:07:33

@dimovich looks good to me. If the mw also can return deferred, you need to convert 'em too.

ikitommi14:07:02

In general, the interceptor pattern fits much better with async: the interceptor executor takes care of passing the unwrapped maps to step functions. Just need a de facto specification to interceptors, to get an ecosystem of interceptor libs, like there is for ring. #interceptors btw.

👍 4