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

@heathmont/lab-flask

Package Overview
Dependencies
Maintainers
53
Versions
212
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@heathmont/lab-flask - npm Package Compare versions

Comparing version 0.1.12 to 0.1.13

1

dist/errorHandler.d.ts

@@ -14,2 +14,3 @@ export interface ParameterError {

export declare const handleLabError: <T>(errorResponse: T, kind: any) => LabError;
export declare const handleInteralError: (e: Error) => LabError;
export {};

@@ -29,2 +29,8 @@ "use strict";

};
exports.handleInteralError = (e) => {
const error = exports.createLabError('INTERNAL');
exports.addParameterError(error, 'message', e.message);
exports.addParameterError(error, 'stack', e.stack);
return error;
};
//# sourceMappingURL=errorHandler.js.map

2

package.json
{
"name": "@heathmont/lab-flask",
"version": "0.1.12",
"version": "0.1.13",
"author": "Margus Lamp",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

import { Proto } from '@heathmont/coingaming-protobuf';
import { handleLabError } from './errorHandler';
import { createLabError, handleInteralError, handleLabError } from './errorHandler';

@@ -24,2 +24,15 @@ describe('errorHandler', () => {

it('should know how to create interal labError', () => {
const error = createLabError('INTERNAL');
expect(error.type).toBe('INTERNAL');
});
it('should know how to create interal labError', () => {
const error = handleInteralError(new Error('Error message'));
const errors = error.errors;
expect(errors.length).toBe(2);
expect(errors.find(error => error.name === 'message').value).toBe('Error message');
expect(errors.find(error => error.name === 'stack').value.length > 0).toBe(true);
});
});

@@ -47,1 +47,8 @@ export interface ParameterError {

};
export const handleInteralError = (e: Error): LabError => {
const error = createLabError('INTERNAL');
addParameterError(error, 'message', e.message);
addParameterError(error, 'stack', e.stack);
return error;
};

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