
Security News
Official Go SDK for MCP in Development, Stable Release Expected in August
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.
@dotcom-reliability-kit/middleware-render-error-info
Advanced tools
Express middleware to render error information in a way that makes local debugging easier.
Express middleware to render error information in a browser in a way that makes local debugging easier. This module is part of FT.com Reliability Kit.
Install @dotcom-reliability-kit/middleware-render-error-info
as a dependency:
npm install --save @dotcom-reliability-kit/middleware-render-error-info
Include in your code:
import renderErrorInfoPage from '@dotcom-reliability-kit/middleware-render-error-info';
// or
const renderErrorInfoPage = require('@dotcom-reliability-kit/middleware-render-error-info');
renderErrorInfoPage
The renderErrorInfoPage
function can be used to generate Express middleware which renders an error debugging page. The error page will only ever display in a non-production environment, that is when the NODE_ENV
environment variable is either empty or set to "development"
.
It must be added to your Express app after all your application routes:
const app = express();
// App routes go here
app.use(renderErrorInfoPage());
Note: if you're using @dotcom-reliability-kit/middleware-log-errors in your app, it's best to mount the error page middleware after the logging middleware. Otherwise the error will never be logged in local development, which may cause some confusion.
Once you've mounted the middleware, if you're working locally you should now see a detailed error page when you encounter an error in your app (assuming you're relying on the Express error handler to serve errors):
See the central contributing guide for Reliability Kit.
Licensed under the MIT license.
Copyright © 2022, The Financial Times Ltd.
FAQs
Express middleware to render error information in a way that makes local debugging easier and production error rendering more consistent.
The npm package @dotcom-reliability-kit/middleware-render-error-info receives a total of 142 weekly downloads. As such, @dotcom-reliability-kit/middleware-render-error-info popularity was classified as not popular.
We found that @dotcom-reliability-kit/middleware-render-error-info demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.
Security News
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.