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

@betterer/errors

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@betterer/errors - npm Package Compare versions

Comparing version 1.0.2 to 1.2.0

4

dist/error-handler.d.ts
import { BettererError } from './error';
import { BettererErrorFactory, BettererErrorMessageFactory } from './types';
export declare function logError(err: Error | BettererError): void;
import { BettererErrorFactory, BettererErrorMessageFactory, ErrorLike } from './types';
export declare function logError(err: ErrorLike | Error | BettererError): void;
export declare function registerError(factory: BettererErrorMessageFactory): BettererErrorFactory;

@@ -11,11 +11,11 @@ "use strict";

var factory = ERROR_MESSAGES.get(err.code);
var errors = err.details.filter(function (detail) { return detail instanceof Error; });
var messages = err.details.filter(function (detail) { return !(detail instanceof Error); });
var errors_1 = err.details.filter(function (detail) { return isErrorLike(detail); });
var messages = err.details.filter(function (detail) { return !errors_1.includes(detail); });
err.message = factory.apply(void 0, messages);
logger_1.error(err.message);
errors.forEach(logError);
errors_1.forEach(logError);
return;
}
logger_1.br();
console.error(err.message, err.stack);
console.error(err.stack);
logger_1.br();

@@ -41,2 +41,5 @@ }

}
function isErrorLike(err) {
return err.message != null && err.stack !== null;
}
//# sourceMappingURL=error-handler.js.map

@@ -5,1 +5,5 @@ import { BettererError } from './error';

export declare type BettererErrorMessageFactory = (...details: BettererErrorDetails) => string;
export declare type ErrorLike = {
message: string;
stack: string;
};
{
"name": "@betterer/errors",
"description": "error handler for @betterer/betterer",
"version": "1.0.2",
"version": "1.2.0",
"license": "MIT",

@@ -29,3 +29,3 @@ "publishConfig": {

},
"gitHead": "db78ef726ff97b65fc4922acdf65a97e6aa7cc31"
"gitHead": "7780911635fc418e46bb4b3f8c60eaf10578b710"
}

Sorry, the diff of this file is not supported yet

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