@financial-times/n-lambda

1.2.2 • Public • Published

n-lambda

Like n-express, but for λ

Usage

'use strict';

var λ = require('@financial-times/n-lambda');

exports.handle = λ(function(event) {
	return somethingThatReturnsAPromise()
	  .catch(function(err) {
	    if (/* err is a server (rather than a user) error */) {
	      λ.raven.captureError(err);
	    }
	    return Promise.reject(err);
	  });
});

Readme

Keywords

none

Package Sidebar

Install

npm i @financial-times/n-lambda

Weekly Downloads

9

Version

1.2.2

License

none

Last publish

Collaborators

  • robgodfrey
  • robertboulton
  • seraph2000
  • hamza.samih
  • notlee
  • emmalewis
  • aendra
  • the-ft
  • rowanmanning
  • chee
  • alexwilson