Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@compas/server

Package Overview
Dependencies
Maintainers
1
Versions
196
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@compas/server - npm Package Compare versions

Comparing version 0.0.167 to 0.0.168

4

package.json
{
"name": "@compas/server",
"version": "0.0.167",
"version": "0.0.168",
"description": "Koa server and common middleware",

@@ -18,3 +18,3 @@ "main": "./index.js",

"dependencies": {
"@compas/stdlib": "0.0.167",
"@compas/stdlib": "0.0.168",
"@types/formidable": "1.2.4",

@@ -21,0 +21,0 @@ "@types/koa": "2.13.4",

@@ -1,2 +0,2 @@

import { AppError, isNil, isStaging } from "@compas/stdlib";
import { AppError, isStaging } from "@compas/stdlib";

@@ -48,11 +48,11 @@ /**

ctx.status = err.status;
ctx.body = onAppError(ctx, err.key, err.info);
const formatted = AppError.format(error);
const formatted = AppError.format(err);
formatted.type = "api_error";
log(formatted);
if (!isNil(err.originalError) && leakError) {
ctx.body.info = ctx.body.info || {};
ctx.body.info._error = formatted;
if (leakError && onAppError === defaultOnAppError) {
ctx.body = formatted;
} else {
ctx.body = onAppError(ctx, err.key, err.info);
}

@@ -59,0 +59,0 @@ }

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