bnoguchi/everyauth — Issue #207: Recovering from error in findUserById
Author: sdether
Created: 2012-03-09 07:23:51+00:00
State: open

I'm trying to figure out how to handle the scenario that i cannot find the user for the given id in findUserById. If i call callback(err) i always end up with

DEBUG: /twitthistory/core/node_modules/everyauth/index.js:40
DEBUG: if (err) throw err; // TODO Leverage everyauth's error handling

What i'd really like to do it just destroy the session so i can force a fresh login, but i can't figure out how to intercept this error to do this, so i just get an error page now.

Even if i define moduleErrback, it gets called but then ends up with the above exception anyhow. Any suggestions, some node.js handling that I'm just too much of a newbie to know about?

thanks,
arne