Nit: we should be consistent with space around the plus operator, so this should be either:

              next(res.error + ": " + res.message, res.appId);

Or:

              next(res.error+": "+res.message, res.appId);

Of which the former is more conventional in Firefox code.