Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't block on failed network #120

Merged
merged 2 commits into from Apr 20, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions index.js
Expand Up @@ -159,9 +159,10 @@ function _make_generateLog(metrics, func, start_time, config, context) {
timeout: config.network_timeout,
},
function(err) {
// Throw uncaught errors from the wrapped function.
if (err) {
context.fail(err)
// Log errors, don't block on failed requests
if (err && config.debug) {
console.log('Write to IOpipe failed:')
console.log(err)
}
callback()
}
Expand Down