包详细信息

strong-error-handler

loopbackio229.3kMIT5.0.19

Error handler for use in development and production environments.

自述文件

strong-error-handler

OpenSSF Best Practices OpenSSF Scorecard Continuous Integration CodeQL

This package is an error handler for use in both development (debug) and production environments.

In production mode, strong-error-handler omits details from error responses to prevent leaking sensitive information:

  • For 5xx errors, the output contains only the status code and the status name from the HTTP specification.
  • For 4xx errors, the output contains the full error message (error.message) and the contents of the details property (error.details) that ValidationError typically uses to provide machine-readable details about validation problems. It also includes error.code to allow a machine-readable error code to be passed through which could be used, for example, for translation.

In debug mode, strong-error-handler returns full error stack traces and internal details of any error objects to the client in the HTTP responses.

Supported versions

This module adopts the Module Long Term Support (LTS) policy, with the following End Of Life (EOL) dates:

Version Status Published EOL
4.x Current Oct 2020 Apr 2023 (minimum)
3.x Active LTS Jun 2018 Dec 2022
2.x End-of-life Mar 2017 Oct 2020

Learn more about our LTS plan in the LoopBack documentation.

Installation

$ npm install --save strong-error-handler

Use

In an Express-based application:

var express = require('express');
var errorHandler = require('strong-error-handler');

var app = express();
// setup your routes
// `options` are set to default values. For more info, see `options` below.
// app.use(errorHandler({ /* options, see below */ }));
app.use(errorHandler({
  debug: app.get('env') === 'development',
  log: true,
}));

app.listen(3000);

The module also exports writeErrorToResponse, a non-middleware flavor of the error handler:

const http = require('http');
const writeErrorToResponse = require('strong-error-handler')
  .writeErrorToResponse;
const errHandlingOptions = {debug: process.env.NODE_ENV === 'development'}

http
  .createServer((req, res) => {
    if (errShouldBeThrown) {
      writeErrorToResponse(
        new Error('something went wrong'),
        req,
        res,
        errHandlingOptions,
      );
    }
  })
  .listen(3000);

In LoopBack applications, add the following entry to server/middleware.json:

{
  "final:after": {
    "strong-error-handler": {
      "params": {
         "debug": false,
         "log": true
       }
    }
  }
}

In general, strong-error-handler must be the last middleware function registered.

The above configuration will log errors to the server console, but not return stack traces in HTTP responses. For details on configuration options, see below.

Response format and content type

The strong-error-handler package supports JSON, HTML and XML responses:

  • When the object is a standard Error object, it returns the string provided by the stack property in HTML/text responses.
  • When the object is a non-Error object, it returns the result of util.inspect in HTML/text responses.
  • For JSON responses, the result is an object with all enumerable properties from the object in the response.

The content type of the response depends on the request's Accepts header.

  • For Accepts header json or application/json, the response content type is JSON.
  • For Accepts header html or text/html, the response content type is HTML.
  • For Accepts header xml or text/xml, the response content type is XML.

There are plans to support other formats such as Plain-text.

Options

Option Type Default Description
debug Boolean    false If true, HTTP responses include all error properties, including sensitive data such as file paths, URLs and stack traces. See Example output below.
log Boolean true If true, all errors are printed via console.error, including an array of fields (custom error properties) that are safe to include in response messages (both 4xx and 5xx).
If false, sends only the error back in the response.
safeFields [String] [] Specifies property names on errors that are allowed to be passed through in 4xx and 5xx responses. See Safe error fields below.
defaultType String "json" Specifies the default response content type to use when the client does not provide any Accepts header.
rootProperty String or false "error" Specifies the root property name for json or xml. If the value is set to false, no wrapper will be added to the json object. The false value is ignored by XML as a root element is always required.
negotiateContentType Boolean true Negotiate the response content type via Accepts request header. When disabled, strong-error-handler will always use the default content type when producing responses. Disabling content type negotiation is useful if you want to see JSON-formatted error responses in browsers, because browsers usually prefer HTML and XML over other content types.

Customizing log format

Express

To use a different log format, add your own custom error-handling middleware then disable errorHandler.log. For example, in an Express application:

app.use(myErrorLogger());
app.use(errorHandler({log: false}));

In general, add strong-error-handler as the last middleware function, just before calling app.listen().

LoopBack

For LoopBack applications, put custom error-logging middleware in a separate file; for example, server/middleware/error-logger.js:

module.exports = function(options) {
  return function logError(err, req, res, next) {
    console.log('unhandled error' ,err);
    next(err);
  };
};

Then in server/middleware.json, specify your custom error logging function as follows:

{
  // ...
  "final:after": {
    "./middleware/error-logger": {},
    "strong-error-handler": {
      "params": {
        "log": false
      }
    }
}

The default middleware.development.json file explicitly enables logging in strong-error-handler params, so you will need to change that file too.

Safe error fields

By default, strong-error-handler will only pass through the name, message and details properties of an error. Additional error properties may be allowed through on 4xx and 5xx status code errors using the safeFields option to pass in an array of safe field names:

{
  "final:after": {
    "strong-error-handler": {
      "params": {
        "safeFields": ["errorCode"]
      }
    }
}

Using the above configuration, an error containing an errorCode property will produce the following response:

{
  "error": {
    "statusCode": 500,
    "message": "Internal Server Error",
    "errorCode": "INTERNAL_SERVER_ERROR"
  }
}

Migration from old LoopBack error handler

NOTE: This is only required for applications scaffolded with old versions of the slc loopback tool.

To migrate a LoopBack 2.x application to use strong-error-handler:

  1. In package.json dependencies, remove "errorhandler": "^x.x.x”,
  2. Install the new error handler by entering the command:
    npm install --save strong-error-handler
  3. In server/config.json, remove:
     "remoting": {
       ...
       "errorHandler": {
         "disableStackTrace": false
       }
    and replace it with:
     "remoting": {
       ...,
       "rest": {
         "handleErrors": false
       }
  4. In server/middleware.json, remove:
     "final:after": {
       "loopback#errorHandler": {}
     }
    and replace it with:
     "final:after": {
       "strong-error-handler": {}
     }
  5. Delete server/middleware.production.json.
  6. Create server/middleware.development.json containing:
     "final:after": {
       "strong-error-handler": {
         "params": {
           "debug": true,
           "log": true
         }
       }
     }
    

For more information, see Migrating apps to LoopBack 3.0.

Example

5xx error generated when debug: false :

{ error: { statusCode: 500, message: 'Internal Server Error' } }

The same error generated when debug: true :

{ error:
  { statusCode: 500,
  name: 'Error',
  message: 'a test error message',
  stack: 'Error: a test error message
  at Context.<anonymous> (User/strong-error-handler/test/handler.test.js:220:21)
  at callFnAsync (User/strong-error-handler/node_modules/mocha/lib/runnable.js:349:8)
  at Test.Runnable.run (User/strong-error-handler/node_modules/mocha/lib/runnable.js:301:7)
  at Runner.runTest (User/strong-error-handler/node_modules/mocha/lib/runner.js:422:10)
  at User/strong-error-handler/node_modules/mocha/lib/runner.js:528:12
  at next (User/strong-error-handler/node_modules/mocha/lib/runner.js:342:14)
  at User/strong-error-handler/node_modules/mocha/lib/runner.js:352:7
  at next (User/strong-error-handler/node_modules/mocha/lib/runner.js:284:14)
  at Immediate._onImmediate (User/strong-error-handler/node_modules/mocha/lib/runner.js:320:5)
  at tryOnImmediate (timers.js:543:15)
  at processImmediate [as _immediateCallback] (timers.js:523:5)' }}

4xx error generated when debug: false :

{ error:
  { statusCode: 422,
  name: 'Unprocessable Entity',
  message: 'Missing required fields',
  code: 'MISSING_REQUIRED_FIELDS' }}

更新日志

2025-05-12, Version 5.0.19

  • chore: lock file maintenance (renovate[bot])

  • chore: update commitlint monorepo to ^19.8.1 (renovate[bot])

  • chore: update dependency eslint to ^9.26.0 (renovate[bot])

  • chore: update github/codeql-action action to v3.28.17 (renovate[bot])

  • chore: update dependency lockfile-lint to ^4.14.1 (renovate[bot])

  • chore: update github/codeql-action action to v3.28.16 (renovate[bot])

  • chore: update step-security/harden-runner action to v2.12.0 (renovate[bot])

  • chore: update dependency eslint to ^9.25.1 (renovate[bot])

  • chore: update dependency eslint to ^9.25.0 (renovate[bot])

2025-04-14, Version 5.0.18

  • chore: lock file maintenance (renovate[bot])

  • chore: update actions/setup-node action to v4.4.0 (renovate[bot])

  • chore: update github/codeql-action action to v3.28.15 (renovate[bot])

  • chore: update github/codeql-action action to v3.28.14 (renovate[bot])

  • chore: update dependency eslint to ^9.24.0 (renovate[bot])

  • chore: update dependency express to v5 (renovate[bot])

  • chore: update step-security/harden-runner action to v2.11.1 (renovate[bot])

  • chore: update github/codeql-action action to v3.28.13 (renovate[bot])

  • chore: update dependency eslint to ^9.23.0 (renovate[bot])

  • chore: update dependency @eslint/eslintrc to ^3.3.1 (renovate[bot])

  • chore: update dependency supertest to ^7.1.0 (renovate[bot])

  • chore: update actions/upload-artifact action to v4.6.2 (renovate[bot])

  • chore: update github/codeql-action action to v3.28.12 (renovate[bot])

  • chore: update actions/setup-node action to v4.3.0 (renovate[bot])

  • chore: update dependency eslint to ^9.22.0 (renovate[bot])

  • chore: update commitlint monorepo to ^19.8.0 (renovate[bot])

  • chore: update github/codeql-action action to v3.28.11 (renovate[bot])

  • chore: update dependency eslint to ^9.21.0 (renovate[bot])

  • chore: update dependency @eslint/eslintrc to ^3.3.0 (renovate[bot])

  • chore: update ossf/scorecard-action action to v2.4.1 (renovate[bot])

  • chore: update actions/upload-artifact action to v4.6.1 (renovate[bot])

  • chore: update github/codeql-action action to v3.28.10 (renovate[bot])

  • chore: update step-security/harden-runner action to v2.11.0 (renovate[bot])

  • chore: update dependency chai to ^5.2.0 (renovate[bot])

  • chore: update dependency eslint to ^9.20.1 (renovate[bot])

2025-02-10, Version 5.0.16

  • chore: lock file maintenance (renovate[bot])

  • chore: update dependency eslint to ^9.20.0 (renovate[bot])

  • chore: update github/codeql-action action to v3.28.9 (renovate[bot])

  • chore: update commitlint monorepo to ^19.7.1 (renovate[bot])

  • chore: update github/codeql-action action to v3.28.8 (renovate[bot])

  • chore: update github/codeql-action action to v3.28.6 (renovate[bot])

  • chore: update actions/setup-node action to v4.2.0 (renovate[bot])

  • chore: update dependency eslint to ^9.19.0 (renovate[bot])

  • chore: update github/codeql-action action to v3.28.5 (renovate[bot])

  • chore: update github/codeql-action action to v3.28.4 (renovate[bot])

  • chore: update github/codeql-action action to v3.28.3 (renovate[bot])

  • chore: update github/codeql-action action to v3.28.2 (renovate[bot])

  • chore: update step-security/harden-runner action to v2.10.4 (renovate[bot])

2025-01-13, Version 5.0.15

  • chore: lock file maintenance (renovate[bot])

  • chore: update dependency eslint to ^9.18.0 (renovate[bot])

  • chore: update github/codeql-action action to v3.28.1 (renovate[bot])

  • chore: update actions/upload-artifact action to v4.6.0 (renovate[bot])

  • chore: update step-security/harden-runner action to v2.10.3 (renovate[bot])

  • chore: update github/codeql-action action to v3.28.0 (renovate[bot])

  • chore: update actions/upload-artifact action to v4.5.0 (renovate[bot])

  • chore: update dependency @commitlint/cli to ^19.6.1 (renovate[bot])

  • chore: update dependency eslint to ^9.17.0 (renovate[bot])

  • chore: update github/codeql-action action to v3.27.9 (renovate[bot])

  • chore: update github/codeql-action action to v3.27.7 (renovate[bot])

  • chore: update dependency debug to ^4.4.0 (renovate[bot])

  • chore: update dependency express to ^4.21.2 (renovate[bot])

2024-12-04, Version 5.0.14

  • chore: update github/codeql-action action to v3.27.6 (renovate[bot])

  • chore: lock file maintenance (renovate[bot])

  • chore: update dependency eslint to ^9.16.0 (renovate[bot])

  • chore: update github/codeql-action action to v3.27.5 (renovate[bot])

  • chore: update commitlint monorepo to ^19.6.0 (renovate[bot])

  • chore: update step-security/harden-runner action to v2.10.2 (renovate[bot])

  • chore: update dependency eslint to ^9.15.0 (renovate[bot])

  • chore: update dependency @eslint/eslintrc to ^3.2.0 (renovate[bot])

  • chore: update dependency eslint to v9 (Rifa Achrinza)

  • chore: update github/codeql-action action to v3.27.4 (renovate[bot])

  • chore: update github/codeql-action action to v3.27.3 (renovate[bot])

  • chore: update github/codeql-action action to v3.27.2 (renovate[bot])

2024-11-11, Version 5.0.13

  • chore: lock file maintenance (renovate[bot])

  • chore: update github/codeql-action action to v3.27.1 (renovate[bot])

  • chore: update dependency mocha to ^10.8.2 (renovate[bot])

  • chore: update dependency mocha to ^10.8.1 (renovate[bot])

  • chore: update actions/setup-node action to v4.1.0 (renovate[bot])

  • chore: update actions/checkout action to v4.2.2 (renovate[bot])

  • fix(html): avoid rendering [Object object] for undefined values (KalleV)

  • chore: update dependency chai to ^5.1.2 (renovate[bot])

  • chore: update github/codeql-action action to v3.27.0 (renovate[bot])

  • chore: update dependency http-status to ^1.8.1 (renovate[bot])

  • chore: update github/codeql-action action to v3.26.13 (renovate[bot])

2024-10-10, Version 5.0.12

  • chore: update actions/upload-artifact action to v4.4.3 (renovate[bot])

  • chore: update dependency express to ^4.21.1 (renovate[bot])

  • chore: update actions/upload-artifact action to v4.4.2 (renovate[bot])

  • chore: update github/codeql-action action to v3.26.12 (renovate[bot])

  • chore: update actions/upload-artifact action to v4.4.1 (renovate[bot])

  • chore: update actions/checkout action to v4.2.1 (renovate[bot])

  • chore: lock file maintenance (renovate[bot])

  • chore: update github/codeql-action action to v3.26.11 (renovate[bot])

  • chore: update github/codeql-action action to v3.26.10 (renovate[bot])

  • chore: update actions/checkout action to v4.2.0 (renovate[bot])

  • chore: update github/codeql-action action to v3.26.9 (renovate[bot])

  • chore: update actions/setup-node action to v4.0.4 (renovate[bot])

  • chore: update github/codeql-action action to v3.26.8 (renovate[bot])

  • chore: update dependency eslint to ^8.57.1 (renovate[bot])

  • chore: update github/codeql-action action to v3.26.7 (renovate[bot])

  • chore: update dependency express to ^4.21.0 (renovate[bot])

  • chore: update commitlint monorepo to ^19.5.0 (renovate[bot])

  • chore: update step-security/harden-runner action to v2.10.1 (renovate[bot])

  • chore: update step-security/harden-runner action to v2.10.0 (renovate[bot])

  • chore: update dependency express to ^4.20.0 (renovate[bot])

2024-09-09, Version 5.0.11

  • chore: lock file maintenance (renovate[bot])

  • chore: update dependency debug to ^4.3.7 (renovate[bot])

  • chore: update actions/upload-artifact action to v4.4.0 (renovate[bot])

  • chore: update github/codeql-action action to v3.26.6 (renovate[bot])

  • chore: update commitlint monorepo to ^19.4.1 (renovate[bot])

  • chore: update github/codeql-action action to v3.26.5 (renovate[bot])

  • chore: update github/codeql-action action to v3.26.4 (renovate[bot])

  • chore: update github/codeql-action action to v3.26.3 (renovate[bot])

  • chore: update github/codeql-action action to v3.26.2 (renovate[bot])

  • chore: update github/codeql-action action to v3.26.1 (renovate[bot])

  • chore: update dependency mocha to ^10.7.3 (renovate[bot])

  • chore: update dependency @commitlint/cli to ^19.4.0 (renovate[bot])

  • chore: update github/codeql-action action to v3.26.0 (renovate[bot])

  • chore: update actions/upload-artifact action to v4.3.6 (renovate[bot])

  • chore: update step-security/harden-runner action to v2.9.1 (renovate[bot])

  • chore: update actions/upload-artifact action to v4.3.5 (renovate[bot])

  • chore: update dependency debug to ^4.3.6 (renovate[bot])

  • chore: update ossf/scorecard-action action to v2.4.0 (renovate[bot])

  • chore: update github/codeql-action action to v3.25.15 (renovate[bot])

  • chore: update github/codeql-action action to v3.25.14 (renovate[bot])

  • chore: update dependency mocha to ^10.7.0 (renovate[bot])

  • chore: update github/codeql-action action to v3.25.13 (renovate[bot])

  • chore: update step-security/harden-runner action to v2.9.0 (renovate[bot])

  • chore: update github/codeql-action action to v3.25.12 (renovate[bot])

  • chore: update actions/setup-node action to v4.0.3 (renovate[bot])

  • chore: update actions/upload-artifact action to v4.3.4 (renovate[bot])

  • chore: update dependency mocha to ^10.6.0 (renovate[bot])

  • chore: update github/codeql-action action to v3.25.11 (renovate[bot])

  • chore: update dependency mocha to ^10.5.2 (renovate[bot])

  • chore: update dependency mocha to ^10.5.1 (renovate[bot])

  • chore: update dependency mocha to ^10.5.0 (renovate[bot])

  • chore: update dependency lockfile-lint to ^4.14.0 (renovate[bot])

  • chore: update github/codeql-action action to v3.25.10 (renovate[bot])

  • chore: update actions/checkout action to v4.1.7 (renovate[bot])

  • chore: update github/codeql-action action to v3.25.9 (renovate[bot])

  • chore: update github/codeql-action action to v3.25.8 (renovate[bot])

  • chore: update step-security/harden-runner action to v2.8.1 (renovate[bot])

  • chore: update dependency debug to ^4.3.5 (renovate[bot])

  • chore: update github/codeql-action action to v3.25.7 (renovate[bot])

  • chore: update step-security/harden-runner action to v2.8.0 (renovate[bot])

  • chore: update github/codeql-action action to v3.25.6 (renovate[bot])

  • chore: update dependency supertest to v7 (renovate[bot])

  • chore: update actions/checkout action to v4.1.6 (renovate[bot])

  • chore: update github/codeql-action action to v3.25.5 (renovate[bot])

  • chore: update ossf/scorecard-action action to v2.3.3 (renovate[bot])

  • chore: update dependency chai to ^5.1.1 (renovate[bot])

  • chore: update actions/checkout action to v4.1.5 (renovate[bot])

  • chore: update github/codeql-action action to v3.25.4 (renovate[bot])

  • chore: update step-security/harden-runner action to v2.7.1 (renovate[bot])

  • chore: update github/codeql-action action to v3.25.3 (renovate[bot])

  • chore: update actions/checkout action to v4.1.4 (renovate[bot])

  • chore: update dependency @commitlint/cli to ^19.3.0 (renovate[bot])

  • chore: update github/codeql-action action to v3.25.2 (renovate[bot])

  • chore: update actions/upload-artifact action to v4.3.3 (renovate[bot])

  • chore: update actions/checkout action to v4.1.3 (renovate[bot])

  • chore: update actions/upload-artifact action to v4.3.2 (renovate[bot])

  • chore: update github/codeql-action action to v3.25.1 (renovate[bot])

  • chore: update github/codeql-action action to v3.25.0 (renovate[bot])

  • chore: update commitlint monorepo to ^19.2.2 (renovate[bot])

  • chore: update github/codeql-action action to v3.24.10 (renovate[bot])

  • chore: update dependency mocha to ^10.4.0 (renovate[bot])

  • chore: update dependency express to ^4.19.2 (renovate[bot])

  • chore: update github/codeql-action action to v3.24.9 (renovate[bot])

  • chore: update dependency express to ^4.19.1 (renovate[bot])

  • chore: update dependency express to ^4.19.0 (renovate[bot])

  • chore: update dependency @commitlint/cli to ^19.2.1 (renovate[bot])

  • chore: update github/codeql-action action to v3.24.8 (renovate[bot])

  • chore: update dependency @commitlint/cli to ^19.2.0 (renovate[bot])

  • chore: update github/codeql-action action to v3.24.7 (renovate[bot])

  • chore: update commitlint monorepo to ^19.1.0 (renovate[bot])

  • chore: update dependency express to ^4.18.3 (renovate[bot])

  • chore: update github/codeql-action action to v3.24.6 (renovate[bot])

  • chore: update commitlint monorepo to ^19.0.3 (renovate[bot])

  • chore: update dependency @commitlint/cli to ^19.0.2 (renovate[bot])

  • chore: update dependency @commitlint/cli to ^19.0.1 (renovate[bot])

  • chore: update commitlint monorepo to v19 (renovate[bot])

  • test: convert to ES Module (Rifa Achrinza)

  • chore: update dependency chai to v5 (renovate[bot])

  • chore: update dependency eslint to ^8.57.0 (renovate[bot])

  • ci: update CodeQL domain allowlist (Rifa Achrinza)

  • chore: update actions/upload-artifact action to v4 (renovate[bot])

  • chore: update github/codeql-action action to v3.24.5 (renovate[bot])

  • chore: update dependency http-status to ^1.7.4 (renovate[bot])

  • chore: update github/codeql-action action to v3.24.4 (renovate[bot])

  • chore: update github/codeql-action action to v3.24.3 (renovate[bot])

  • chore: update dependency @commitlint/config-conventional to ^18.6.2 (renovate[bot])

  • chore: update dependency lockfile-lint to ^4.13.2 (renovate[bot])

  • chore: update github/codeql-action action to v3.24.1 (renovate[bot])

  • chore: update commitlint monorepo to ^18.6.1 (renovate[bot])

2024-02-12, Version 5.0.7

  • chore: lock file maintenance (renovate[bot])

  • chore: update dependency lockfile-lint to ^4.13.1 (renovate[bot])

  • chore: update dependency lockfile-lint to ^4.13.0 (renovate[bot])

  • chore: update dependency mocha to ^10.3.0 (renovate[bot])

  • chore: update actions/setup-node action to v4.0.2 (renovate[bot])

  • chore: update step-security/harden-runner action to v2.7.0 (renovate[bot])

  • chore: update github/codeql-action action to v3.24.0 (renovate[bot])

  • chore: update github/codeql-action action to v3.23.2 (renovate[bot])

  • chore: update commitlint monorepo to ^18.6.0 (renovate[bot])

  • chore: update github/codeql-action action to v3.23.1 (renovate[bot])

  • chore: update dependency supertest to ^6.3.4 (renovate[bot])

  • chore: update dependency chai to ^4.4.1 (renovate[bot])

  • chore: update github/codeql-action action to v3 (renovate[bot])

  • chore: update github/codeql-action action to v2.23.0 (renovate[bot])

  • chore: update dependency chai to ^4.4.0 (renovate[bot])

  • chore: update commitlint monorepo to ^18.4.4 (renovate[bot])

  • chore: update dependency eslint to ^8.56.0 (renovate[bot])

  • chore: update actions/setup-node action to v4.0.1 (renovate[bot])

  • chore: update github/codeql-action action to v2.22.12 (renovate[bot])

  • chore: update github/codeql-action action to v2.22.10 (renovate[bot])

  • chore: update github/codeql-action action to v2.22.9 (renovate[bot])

  • chore: update step-security/harden-runner action to v2.6.1 (renovate[bot])

  • chore: add badges (Rifa Achrinza)

  • ci: further harden workflows (Rifa Achrinza)

  • ci: fix Scorecard issues (Rifa Achrinza)

  • chore: update dependency eslint to ^8.55.0 (renovate[bot])

  • chore: update github/codeql-action action to v2.22.8 (renovate[bot])

  • chore: update commitlint monorepo to ^18.4.3 (renovate[bot])

  • chore: update dependency eslint to ^8.54.0 (renovate[bot])

  • chore: update commitlint monorepo to ^18.4.2 (renovate[bot])

  • chore: update github/codeql-action action to v2.22.7 (renovate[bot])

  • chore: update github/codeql-action action to v2.22.6 (renovate[bot])

  • chore: update commitlint monorepo (renovate[bot])

  • fix(cve-2023-29827): replace EJS with Handlebars to resolve security warning (KalleV)

  • ci: align CI configuration (Rifa Achrinza)

  • chore: update dependency @types/express to ^4.17.21 (renovate[bot])

  • chore: update dependency eslint to ^8.53.0 (renovate[bot])

  • chore: update dependency @commitlint/config-conventional to ^18.1.0 (renovate[bot])

  • chore: update dependency @commitlint/config-conventional to v18 (renovate[bot])

  • chore: update dependency eslint to ^8.52.0 (renovate[bot])

  • chore: update dependency @commitlint/config-conventional to ^17.8.1 (renovate[bot])

  • chore: update dependency @types/express to ^4.17.20 (renovate[bot])

  • chore: update dependency http-status to ^1.7.3 (renovate[bot])

2023-10-16, Version 5.0.2

  • chore: lock file maintenance (renovate[bot])

  • chore: update dependency @commitlint/config-conventional to ^17.8.0 (renovate[bot])

  • chore: update dependency @types/express to ^4.17.19 (renovate[bot])

  • chore: update dependency eslint to ^8.51.0 (renovate[bot])

  • chore: update dependency chai to ^4.3.10 (renovate[bot])

  • chore: update dependency chai to ^4.3.9 (renovate[bot])

  • chore: update actions/checkout digest to 8ade135 (renovate[bot])

  • chore: update dependency @types/express to ^4.17.18 (renovate[bot])

  • chore: update dependency eslint to ^8.50.0 (renovate[bot])

2023-09-11, Version 5.0.1

  • chore: lock file maintenance (renovate[bot])

  • chore: update dependency eslint to ^8.49.0 (renovate[bot])

  • chore: update dependency http-status to ^1.7.0 (renovate[bot])

  • chore: update actions/checkout action to v4 (renovate[bot])

  • chore: update dependency eslint to ^8.48.0 (renovate[bot])

  • chore: update dependency chai to ^4.3.8 (renovate[bot])

2023-08-21, Version 5.0.0

  • chore: lock file maintenance (renovate[bot])

  • chore: update dependency strong-globalize to ^6.0.6 (renovate[bot])

  • chore: update dependency js2xmlparser to v5 (renovate[bot])

  • chore: drop Node.js 14 and lower (dhmlau)

2023-08-14, Version 4.0.8

  • chore: update dependency eslint to ^8.47.0 (renovate[bot])

  • chore: update dependency @commitlint/config-conventional to ^17.7.0 (renovate[bot])

  • chore: update dependency eslint to ^8.46.0 (renovate[bot])

  • chore: update dependency @commitlint/config-conventional to ^17.6.7 (renovate[bot])

  • chore: lock file maintenance (renovate[bot])

  • chore: update dependency eslint to ^8.45.0 (renovate[bot])

2023-07-11, Version 4.0.7

  • chore: lock file maintenance (renovate[bot])

  • chore: update dependency eslint to ^8.44.0 (renovate[bot])

  • chore: update dependency @commitlint/config-conventional to ^17.6.6 (renovate[bot])

  • chore: update dependency eslint to ^8.43.0 (renovate[bot])

2023-06-13, Version 4.0.6

  • chore: lock file maintenance (renovate[bot])

  • fix: remove grafana from package (dhmlau)

  • chore: update dependency eslint to ^8.42.0 (renovate[bot])

2023-06-02, Version 4.0.5

  • chore: update dependency @commitlint/config-conventional to ^17.6.5 (renovate[bot])

  • chore: lock file maintenance (renovate[bot])

  • chore: update dependency eslint to ^8.41.0 (renovate[bot])

2023-05-15, Version 4.0.4

  • chore: lock file maintenance (renovate[bot])

  • chore: update dependency eslint to ^8.40.0 (renovate[bot])

  • chore: update dependency @commitlint/config-conventional to ^17.6.3 (renovate[bot])

  • chore: update dependency eslint to ^8.39.0 (renovate[bot])

  • chore: update dependency @commitlint/config-conventional to ^17.6.1 (renovate[bot])

2023-04-13, Version 4.0.3

  • chore: update dependency @commitlint/config-conventional to ^17.6.0 (renovate[bot])

  • chore: update dependency eslint to ^8.38.0 (renovate[bot])

  • chore: lock file maintenance (renovate[bot])

  • chore: update dependency eslint to ^8.37.0 (renovate[bot])

  • chore: update dependency ejs to ^3.1.9 (renovate[bot])

  • chore: update dependency eslint to ^8.36.0 (renovate[bot])

2023-03-09, Version 4.0.2

  • chore: lock file maintenance (renovate[bot])

  • chore: update dependency eslint to ^8.35.0 (renovate[bot])

  • chore: update dependency http-status to ^1.6.2 (renovate[bot])

  • chore: update dependency eslint to ^8.34.0 (renovate[bot])

  • chore: update dependency @commitlint/config-conventional to ^17.4.4 (renovate[bot])

  • chore: update dependency @types/express to ^4.17.17 (renovate[bot])

  • chore: update dependency eslint to ^8.31.0 (renovate[bot])

  • chore: update dependency eslint to ^8.30.0 (renovate[bot])

  • chore: update dependency @types/express to ^4.17.15 (renovate[bot])

  • chore: update dependency mocha to ^10.2.0 (renovate[bot])

  • chore: update dependency supertest to ^6.3.3 (renovate[bot])

  • chore: update dependency eslint to ^8.29.0 (renovate[bot])

  • chore: update dependency supertest to ^6.3.2 (renovate[bot])

  • chore: update dependency @commitlint/config-conventional to ^17.3.0 (renovate[bot])

  • chore: update dependency eslint to ^8.28.0 (renovate[bot])

2022-11-07, Version 4.0.1

  • chore: update dependency mocha to v10 (renovate[bot])

  • chore: update dependency chai to ^4.3.7 (renovate[bot])

  • chore: lock file maintenance (renovate[bot])

  • chore: update dependency eslint to ^8.27.0 (renovate[bot])

  • chore: update dependency eslint to v8 (renovate[bot])

  • chore: update dependency @commitlint/config-conventional to ^17.2.0 (renovate[bot])

  • chore: update dependency supertest to ^6.3.1 (renovate[bot])

  • chore: update dependency express to ^4.18.2 (renovate[bot])

  • chore: update dependency supertest to ^6.3.0 (renovate[bot])

  • chore: update dependency @types/express to ^4.17.14 (renovate[bot])

  • chore: update dependency @commitlint/config-conventional to v17 (renovate[bot])

  • chore: update dependency http-status to ^1.5.3 (renovate[bot])

  • chore: update dependency supertest to ^6.2.4 (renovate[bot])

  • chore: lock file maintenance (Renovate Bot)

  • chore: update dependency ejs to ^3.1.8 (Renovate Bot)

  • chore: update dependency http-status to ^1.5.2 (Renovate Bot)

  • chore: update dependency supertest to ^6.2.3 (Renovate Bot)

  • chore: update dependency @commitlint/config-conventional to ^16.2.4 (Renovate Bot)

  • chore: update github/codeql-action action to v2 (Renovate Bot)

  • chore: update dependency express to ^4.18.1 (Renovate Bot)

  • chore: update dependency ejs to ^3.1.7 (Renovate Bot)

  • chore: update dependency http-status to ^1.5.1 (Renovate Bot)

  • chore: update dependency @commitlint/config-conventional to v16 (Renovate Bot)

  • chore: update actions/setup-node action to v3 (Renovate Bot)

  • chore: update actions/checkout action to v3 (Renovate Bot)

  • chore: update dependency supertest to ^6.2.2 (Renovate Bot)

  • chore: update dependency mocha to ^9.2.2 (Renovate Bot)

  • chore: update dependency fast-safe-stringify to ^2.1.1 (Renovate Bot)

  • chore: update dependency eslint to ^7.32.0 (Renovate Bot)

  • chore: update dependency js2xmlparser to ^4.0.2 (Renovate Bot)

  • chore: update dependency ejs to ^3.1.6 (Renovate Bot)

  • chore: update dependency strong-globalize to ^6.0.5 (Renovate Bot)

  • chore: update dependency http-status to ^1.5.0 (Renovate Bot)

  • chore: update dependency express to ^4.17.3 (Renovate Bot)

  • chore: update dependency debug to ^4.3.4 (Renovate Bot)

  • chore: update dependency accepts to ^1.3.8 (Renovate Bot)

  • chore: update dependency chai to ^4.3.6 (Renovate Bot)

  • ci: add renovate config (Rifa Achrinza)

  • docs: add SECURITY.md (Diana Lau)

  • docs: update coc (Diana Lau)

  • docs: add code of conduct (Diana Lau)

  • feat: update CI pipeline (Rifa Achrinza)

  • chore: move repo to loopbackio org (Diana Lau)

2020-10-13, Version 4.0.0

  • docs: update LTS versions in README (Miroslav Bajtoš)

  • [SEMVER-MAJOR] Reword log messages for clarity (Miroslav Bajtoš)

2020-06-23, Version 3.5.0

  • feat: add options.rootProperty for json/xml (Raymond Feng)

  • chore: update deps and drop Node 8.x support (Raymond Feng)

2019-10-12, Version 3.4.0

  • chore: js2xmlparser to ^4.0.0 (Miroslav Bajtoš)

  • chore: update dev-dependencies (mocha, supertest) (Miroslav Bajtoš)

  • chore: update eslint & config to latest (Miroslav Bajtoš)

  • chore: update strong-globalize to ^5.0.2 (Miroslav Bajtoš)

  • chore: update debug to ^4.1.1 (Miroslav Bajtoš)

  • feat: drop support for Node.js 6.x (Miroslav Bajtoš)

2019-09-30, Version 3.3.0

  • fix: handle Error objects with circular properties (dkrantsberg)

  • chore: update copyrights years (Agnes Lin)

2018-08-30, Version 3.2.0

  • Add type definition and writeErrorToResponse (shimks)

2018-07-16, Version 3.1.0

  • [WebFM] cs/pl/ru translation (candytangnb)

2018-06-11, Version 3.0.0

  • Allow safeFields to work with arrays (shimks)

  • run lint (shimks)

  • drop node 4 from travis and update dependencies (shimks)

2018-03-05, Version 2.3.2

  • Undefined safeFields revert to data #71 (Zak Barbuto)

2018-01-25, Version 2.3.1

  • Escape strings in HTML output (XSS fix) (Zachery Metcalf)

  • Update LICENSE.md (Diana Lau)

2017-10-13, Version 2.3.0

  • update strong-globalize to 3.1.0 (shimks)

  • CODEOWNERS: add zbarbuto (Miroslav Bajtoš)

  • Update Issue and PR Templates (#59) (Sakib Hasan)

  • fixed json typo of server/middleware.json (karanssj4)

  • Add CODEOWNER file (Diana Lau)

2017-07-20, Version 2.2.0

  • Add new option: negotiateContentType (Raj)

2017-04-18, Version 2.1.0

  • Bump js2xmlparser dependency to version 3.0.0 (Matthew O'Donoghue)

2017-03-22, Version 2.0.0

  • Fix markdown formatting in README (Miroslav Bajtoš)

  • Fix the order of arguments in the jsdoc comment. (Charlie Schliesser)

  • Update readme with added XML support (David Cheung)

  • Add a machine-readable "code" property (Zak Barbuto)

  • Upgrade dependencies to their latest versions (Miroslav Bajtoš)

  • Describe "safeFields" option in README (Zak Barbuto)

  • Drop support for Node v0.10/v0.12 (Miroslav Bajtoš)

2017-01-30, Version 1.2.1

  • Stop adding safeFields to original options arg (Miroslav Bajtoš)

2017-01-30, Version 1.2.0

  • Support options.safeFields (Zak Barbuto)

  • Readme cleanup (#36) (Rand McKinney)

  • xml support added (Ahmet Ozisik)

  • Update paid support URL (Siddhi Pai)

  • Downstream ignore dashboard-controller (Simon Ho)

  • Update pt translation file (Candy)

  • Make the examples more clear (Amir Jafarian)

  • Fix readme (Amir Jafarian)

2016-10-07, Version 1.1.1

  • Update pt translation file (Candy)

  • Update translation files - round#2 (Candy)

  • globalization: add translated strings (gunjpan)

2016-09-05, Version 1.1.0

  • Fix minor Syntax error (Loay)

  • Globalize strong-error-handler (David Cheung)

  • Update eslint infrastructure (Loay)

  • Add documentation (Loay)

  • Improve grammar in readme. (Richard Pringle)

  • Test with express instead of http server (David Cheung)

  • HTML response for accepted headers (David Cheung)

2016-05-26, Version 1.0.1

  • Remove statusCode from details in Array errors (David Cheung)

2016-05-20, Version 1.0.0

  • First release!