[Feedhenry-raincatcher] Promise exception in fh-wfm-user server module

Paolo Haji phajidec at redhat.com
Wed Mar 22 13:22:11 UTC 2017


Note that this is also a Warning as opposed to an exception. I'm not sure
the call on line 33
<https://github.com/feedhenry-raincatcher/raincatcher-user/blob/master/lib/router/mbaas.js#L33>
creates
a promise, that object is expected to be an instance of express-session
<https://github.com/expressjs/session>. I think bluebird is only
complaining about not receiving a promise to wait on in this handler
<https://github.com/feedhenry-raincatcher/raincatcher-user/blob/master/lib/router/mbaas.js#L25-L46>,
and thus the catch() block might not be called for it.

Since the catch block is only intended for the userAuth.auth() call, maybe
moving it up in the chain would get rid of the warning. The errors inside
the handler are dealt with through node-style callbacks instead of promises.

On Wed, Mar 22, 2017 at 10:09 AM, Gerard Ryan <gryan at redhat.com> wrote:

> David Martin <davmarti at redhat.com> writes:
>
> > I haven't looked into the cause of this yet, but I'm wondering if anyone
> > else has seen this exception?
> > I'm seeing it locally with the raincatcher-demo-auth app from
> > https://github.com/feedhenry-raincatcher/raincatcher-demo-auth on
> master.
>
> Hi David,
>
> I've seen it, but I've just treated it as a warning. I think on the line
> in question there just needs to be `return <Promise>` instead of just
> `<Promise>`.
>
> _______________________________________________
> Feedhenry-raincatcher mailing list
> Feedhenry-raincatcher at redhat.com
> https://www.redhat.com/mailman/listinfo/feedhenry-raincatcher
>



-- 
Paolo Bueno
Software Engineer
Red Hat Mobile Application Platform
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/feedhenry-raincatcher/attachments/20170322/b355cd31/attachment.htm>


More information about the Feedhenry-raincatcher mailing list