Invoking .then/.catch before returning, if result is a promise Fallback wrapping of result (in our callback, inside a promise) to trigger our on-resolution processes. Code cleanup. Reverting to sendReport and reutrning error in promise catch, following the pattern of the enclosing try/catch block.
Invoking .then/.catch before returning, if result is a promise
Fallback wrapping of result (in our callback, inside a promise) to trigger our on-resolution processes.
Code cleanup.
Reverting to sendReport and reutrning error in promise catch, following the pattern of the enclosing try/catch block.

iopipe/iopipe