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

@springworks/error-factory

Package Overview
Dependencies
Maintainers
1
Versions
434
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@springworks/error-factory - npm Package Compare versions

Comparing version 3002.19.39 to 3002.19.40

10

build/fel.js

@@ -47,9 +47,9 @@ "use strict";

function useParamsOrDefaults(params) {
return (params !== null && params !== void 0 ? params : {});
return params !== null && params !== void 0 ? params : {};
}
function createError(params) {
var _a, _b, _c;
var _a, _b;
const { code, message, cause, root_error_id, stack_from } = useParamsOrDefaults(params);
const error = new Error(message !== null ? message : undefined);
Error.captureStackTrace(error, (stack_from !== null && stack_from !== void 0 ? stack_from : createError));
Error.captureStackTrace(error, stack_from !== null && stack_from !== void 0 ? stack_from : createError);
const error_code = getStatusCode(code, cause);

@@ -61,3 +61,3 @@ boom_1.boomify(error, { statusCode: error_code });

error.output.payload.error_id = error_id;
const root_id = (_a = getRootErrorId(root_error_id, cause), (_a !== null && _a !== void 0 ? _a : error_id));
const root_id = (_a = getRootErrorId(root_error_id, cause)) !== null && _a !== void 0 ? _a : error_id;
error.root_error_id = root_id;

@@ -73,3 +73,3 @@ error.output.payload.root_error_id = root_id;

}
if ((_c = (_b = cause) === null || _b === void 0 ? void 0 : _b.output) === null || _c === void 0 ? void 0 : _c.headers) {
if ((_b = cause === null || cause === void 0 ? void 0 : cause.output) === null || _b === void 0 ? void 0 : _b.headers) {
error.output.headers = cause.output.headers;

@@ -76,0 +76,0 @@ }

@@ -6,2 +6,10 @@ # Change Log

## 3002.19.40 (2020-02-27)
**Note:** Version bump only for package @springworks/error-factory
## 3002.19.39 (2020-02-24)

@@ -8,0 +16,0 @@

{
"name": "@springworks/error-factory",
"version": "3002.19.39",
"version": "3002.19.40",
"description": "Custom error that makes use of HTTP error codes to identify different error types.",

@@ -16,4 +16,4 @@ "main": "build/main.js",

"@hapi/boom": "^8.0.1",
"@springworks/random-string": "3002.19.39",
"@springworks/swagger-schema-interfaces": "3002.19.39",
"@springworks/random-string": "3002.19.40",
"@springworks/swagger-schema-interfaces": "3002.19.40",
"@types/hapi__boom": "^7.4.1"

@@ -34,3 +34,3 @@ },

"homepage": "https://github.com/Springworks/m2h-mono/tree/master/packages/error-factory#readme",
"gitHead": "7c8401aa129d5e757d5445d8a3742bd21a979978"
"gitHead": "3bf3b219fb741b747fd66dc7035d80f28304f012"
}
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