@compas/stdlib
Advanced tools
Comparing version 0.0.219 to 0.0.220
{ | ||
"name": "@compas/stdlib", | ||
"version": "0.0.219", | ||
"version": "0.0.220", | ||
"description": "All kinds of utility functions", | ||
@@ -20,6 +20,6 @@ "main": "./index.js", | ||
"dependencies": { | ||
"@types/node": "18.11.12", | ||
"@types/node": "18.11.17", | ||
"dotenv": "16.0.3", | ||
"lodash.merge": "4.6.2", | ||
"pino": "8.7.0" | ||
"pino": "8.8.0" | ||
}, | ||
@@ -26,0 +26,0 @@ "author": { |
@@ -175,2 +175,20 @@ // @ts-nocheck | ||
routine: e?.routine, | ||
severity_local: e?.severity_local, | ||
file: e?.file, | ||
line: e?.line, | ||
detail: e?.detail, | ||
hint: e?.hint, | ||
internal_position: e?.internal_position, | ||
internal_query: e?.internal_query, | ||
where: e?.where, | ||
schema_name: e?.schema_name, | ||
table_name: e?.table_name, | ||
column_name: e?.column_name, | ||
data: e?.data, | ||
type_name: e?.type_name, | ||
constraint_name: e?.constraint_name, | ||
query: e?.query, | ||
parameters: e?.parameters, | ||
}, | ||
@@ -180,2 +198,13 @@ stack, | ||
} else if (e.isAxiosError) { | ||
// Dumping is most of the time not what the user expects, so prevent these from | ||
// being added to the result. | ||
const body = | ||
typeof e.response?.data?.pipe === "function" && // @ts-ignore | ||
typeof e.response?.data?._read === "function" | ||
? { | ||
message: | ||
"Response was a stream, which can not be serialized by AppError#format. Use a try-catch and 'streamToBuffer(e.response?.data)' to get the provided response.", | ||
} | ||
: e.response?.data; | ||
return { | ||
@@ -185,7 +214,11 @@ name: e.name, | ||
axios: { | ||
requestPath: e.request?.path, | ||
requestMethod: e.request?.method, | ||
responseStatus: e.response?.status, | ||
responseHeaders: e.response?.headers, | ||
responseBody: e.response?.data, | ||
request: { | ||
path: e.request?.path, | ||
method: e.request?.method, | ||
baseUrl: e.request?.baseURL, | ||
}, | ||
response: { | ||
status: e.response?.status, | ||
body, | ||
}, | ||
}, | ||
@@ -192,0 +225,0 @@ stack, |
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
67471
2422
+ Added@types/node@18.11.17(transitive)
+ Addedpino@8.8.0(transitive)
- Removed@types/node@18.11.12(transitive)
- Removedpino@8.7.0(transitive)
Updated@types/node@18.11.17
Updatedpino@8.8.0