Guest User

Untitled

a guest
Jun 17th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. export.handler = function (evt, ctx, callback) {
  2. Promise.resolve()
  3. .then(() => {
  4. // Unmodified handler execution
  5. })
  6. .then(koaResponse => {
  7. // Unmodified success handling
  8. })
  9. .catch(e => {
  10. if (!e) {
  11. console.log('A falsy error was thrown. Who would do that?', e);
  12. }
  13. callback(e);
  14. });
  15. };
  16. };
Add Comment
Please, Sign In to add comment