StdLib Platform Updates: Functions Run on Node 8.9.4, Automatic Error Logging

Jacob Lee
Standard Library
Published in
2 min readJan 25, 2018

Hey everyone! I’m excited to announce some StdLib platform updates. We’ve added support for automatic logging of uncaught errors within a function — including mistakes like typos within live functions. We’ve also updated the default Node engine to Node 8.9.4.

If you’re not familiar with StdLib, we’re a function as a service (FaaS) library that allows users to rapidly create, discover, and consume APIs as web functions. We’re the fastest way for developers to turn their code into a live, infinitely-scalable, production-ready endpoint. This tutorial on our Github page will walk you through the process of signing up and creating your first service. You can also check out our most recent product, StdLib Sourcecode, which makes creating a wide variety of production-ready projects dead simple.

Automatic Error Logging

Have you ever built a Slack bot or other webhook reliant project where you don’t directly see the response of your function execution? Even a simple uncaught syntax error can cause your service to mysteriously fail.

With today’s update, StdLib now automatically logs uncaught exceptions, giving you greater insight into these cases. As an example, the following StdLib function contains some invalid values:

If you run $ lib up dev, then attempt to execute the function and check your service logs by running:

$ lib logs <username>.<service name>[@dev] -t stderr

(Note the -t stderr in the above command) You should see:

This functionality should make debugging various services and projects far easier, even when you can’t directly see the response!

Node 8.9.4 Support

StdLib now ships with Node 8.9.4 as the default engine for functions. To use the previous engine version, you should manually set "engine": "nodejs-8.9.1"in the "stdlib" field of your package.json. You can check out the release notes for Node 8.9.4 here.

That’s it!

We’ve got more exciting features and announcements coming up in the next few weeks, so stay tuned by following us on Twitter @StdLibHQ. You can also join our Slack channel by going to our homepage and requesting an invite under the “Community” tab. Feel free to reach out anytime!

Jacob Lee is one of the co-founders of StdLib and firm believer in the FaaS future. He’s an east-coast transplant and ex-Googler who loves skiing, playing squash, and traveling. Follow him on Twitter @hacubu!

--

--

Jacob Lee
Standard Library

Co-founder at Standard Library (@StdLibHQ). Formerly engineer @Google Photos. Spent WAY too much time in front of a screen as a kid.