Socket
Socket
Sign inDemoInstall

errorhandler

Package Overview
Dependencies
Maintainers
6
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

errorhandler - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

5

History.md

@@ -0,1 +1,6 @@

1.0.2 / 2014-06-05
==================
* Pass on errors from reading error files
1.0.1 / 2014-04-29

@@ -2,0 +7,0 @@ ==================

4

index.js
/*!
* Connect - errorHandler
* errorhandler
* Copyright(c) 2010 Sencha Inc.

@@ -58,3 +58,5 @@ * Copyright(c) 2011 TJ Holowaychuk

fs.readFile(__dirname + '/public/style.css', 'utf8', function(e, style){
if (e) return next(e);
fs.readFile(__dirname + '/public/error.html', 'utf8', function(e, html){
if (e) return next(e);
var stack = (err.stack || '')

@@ -61,0 +63,0 @@ .split('\n').slice(1)

{
"name": "errorhandler",
"description": "connect's default error handler page",
"version": "1.0.1",
"author": {
"name": "Jonathan Ong",
"email": "me@jongleberry.com",
"url": "http://jongleberry.com",
"twitter": "https://twitter.com/jongleberry"
},
"version": "1.0.2",
"author": "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/expressjs/errorhandler.git"
},
"bugs": {
"mail": "me@jongleberry.com",
"url": "https://github.com/expressjs/errorhandler/issues"
},
"repository": "expressjs/errorhandler",
"devDependencies": {
"connect": "3",
"istanbul": "0.2.10",
"mocha": ">= 1.17.0 < 2",
"should": ">= 3.0.0 < 4",
"supertest": "*",
"connect": "*"
"should": "~4.0.1",
"supertest": "~0.13.0"
},

@@ -30,4 +19,6 @@ "engines": {

"scripts": {
"test": "mocha --reporter spec --require should"
"test": "mocha --reporter dot test/",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/",
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec test/"
}
}

@@ -1,12 +0,35 @@

# Error Handler
# errorhandler
[![NPM version](https://badge.fury.io/js/errorhandler.svg)](http://badge.fury.io/js/errorhandler)
[![Build Status](https://travis-ci.org/expressjs/errorhandler.svg?branch=master)](https://travis-ci.org/expressjs/errorhandler)
[![Coverage Status](https://img.shields.io/coveralls/expressjs/errorhandler.svg?branch=master)](https://coveralls.io/r/expressjs/errorhandler)
Previously `connect.errorHandler()`.
[![Build Status](https://travis-ci.org/expressjs/errorhandler.svg?branch=master)](https://travis-ci.org/expressjs/errorhandler)
## Install
Usage:
```sh
$ npm install errorhandler
```
## API
### errorhandler()
Create new middleware to handle errors and respond with content negotiation.
This middleware is only intended to be used in a development environment, as
the full error stack traces will be send back to the client when an error
occurs.
## Example
```js
var app = require('connect');
app.use(require('errorhandler')())
var connect = require('connect')
var errorhandler = require('errorhandler')
var app = connect()
if (process.env.NODE_ENV === 'development') {
app.use(errorhandler())
}
```

@@ -13,0 +36,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc