![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@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.
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 0 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.