@compas/server
Advanced tools
Comparing version 0.0.167 to 0.0.168
{ | ||
"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 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
48627
+ Added@compas/stdlib@0.0.168(transitive)
+ Added@types/node@16.11.1(transitive)
+ Addedatomic-sleep@1.0.0(transitive)
+ Addedfast-redact@3.5.0(transitive)
+ Addedfastify-warning@0.2.0(transitive)
+ Addedget-caller-file@2.0.5(transitive)
+ Addedgopd@1.1.0(transitive)
+ Addedhas-proto@1.1.0(transitive)
+ Addedhas-symbols@1.1.0(transitive)
+ Addedjson-stringify-safe@5.0.1(transitive)
+ Addedon-exit-leak-free@0.2.0(transitive)
+ Addedpino@7.0.2(transitive)
+ Addedpino-std-serializers@4.0.0(transitive)
+ Addedquick-format-unescaped@4.0.4(transitive)
+ Addedsonic-boom@2.8.0(transitive)
+ Addedthread-stream@0.11.2(transitive)
- Removed@compas/stdlib@0.0.167(transitive)
- Removed@types/node@16.10.2(transitive)
- Removedgopd@1.0.1(transitive)
- Removedhas-proto@1.0.3(transitive)
- Removedhas-symbols@1.0.3(transitive)
Updated@compas/stdlib@0.0.168