![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.
Error response middleware for koa supporting:
$ npm install koa-error
template
path to template written with your template engineengine
template engine name passed to consolidatecache
cached compiled functions, default: NODE_ENV != 'development'
env
force a NODE_ENV, default: development
accepts
mimetypes passed to ctx.accepts, default: [ 'html', 'text', 'json' ]
By using the template
option you can override the bland default template,
with the following available local variables:
env
ctx
request
response
error
stack
status
code
Here are some examples:
app.use(error({
engine: 'pug',
template: __dirname + '/error.pug'
}));
doctype html
html
head
title= 'Error - ' + status
body
#error
h1 Error
p Looks like something broke!
if env == 'development'
h2 Message:
pre: code= error
h2 Stack:
pre: code= stack
app.use(error({
engine: 'nunjucks',
template: __dirname + '/error.njk'
}));
<!DOCTYPE html>
<html>
<head>
<title>Error - {{status}}</title>
</head>
<body>
<div id="error">
<h1>Error</h1>
<p>Looks like something broke!</p>
{% if env == 'development' %}
<h2>Message:</h2>
<pre>
<code>
{{error}}
</code>
</pre>
<h2>Stack:</h2>
<pre>
<code>
{{stack}}
</code>
</pre>
{% endif %}
</div>
</body>
</html>
MIT
FAQs
Error reponses (text, json, html) for koa
We found that koa-error demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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.