New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@keepfy/error-extractor

Package Overview
Dependencies
Maintainers
3
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@keepfy/error-extractor - npm Package Compare versions

Comparing version 1.3.3 to 1.3.4

.travis.yml

6

lib/error.js

@@ -37,2 +37,6 @@ "use strict";

}
// eslint-disable-next-line max-len
if (message.includes('Não é possível finalizar uma solicitação de serviço se ela possui uma ordem de serviço aberta')) {
return 'CANNOT_FINISH_REQUEST_WITH_ORDER';
}
return 'UNKNOWN_ERROR';

@@ -49,3 +53,3 @@ };

// Fallback to message include calls
if (fallbackTypes.includes(error.code)) {
if (fallbackTypes.find(code => code === error.code)) {
const properties = error.properties;

@@ -52,0 +56,0 @@ const message = properties && properties.message

74

lib/suggestions.d.ts

@@ -1,71 +0,39 @@

import { SuggestionsMap } from './types';
import { GraphQLError, SuggestionsMap } from './types';
export declare const getSuggestion: <T extends import("./types").AllErrorTypes = import("./types").AllErrorTypes>(code: T) => SuggestionsMap[T];
export declare const suggestionFromGraphQLError: (graphQLErrors: readonly any[]) => {
message: any;
export declare const suggestionFromGraphQLError: (graphQLErrors: readonly GraphQLError[]) => (import("./types").MessageSuggestion & {
type: "SERVICE_OFFLINE";
title: string;
} | {
message: any;
}) | (import("./types").MessageSuggestion & {
type: "CONNECTION_FAILED";
title: string;
} | {
message: any;
}) | (import("./types").MessageSuggestion & {
type: "UNKNOWN_ERROR";
title: string;
} | {
message: any;
}) | (import("./types").MessageSuggestion & {
type: "EMAIL_NOT_CONFIRMED";
title: string;
} | {
message: any;
}) | (import("./types").MessageSuggestion & {
type: "EMAIL_ALREADY_EXISTS";
title: string;
} | {
message: any;
}) | (import("./types").MessageSuggestion & {
type: "SCHEMA_UNKNOWN_FIELD";
title: string;
} | {
message: any;
}) | (import("./types").MessageSuggestion & {
type: "CANNOT_FINISH_REQUEST_WITH_ORDER";
}) | (import("./types").MessageSuggestion & {
type: "AUTHENTICATION_FAILED";
title: string;
} | {
message: any;
}) | (import("./types").MessageSuggestion & {
type: "FORBIDDEN";
title: string;
} | {
message: any;
}) | (import("./types").MessageSuggestion & {
type: "INVALID_SESSION";
title: string;
} | {
message: any;
}) | (import("./types").MessageSuggestion & {
type: "INVALID_SUBSCRIPTION";
title: string;
} | {
message: any;
}) | (import("./types").MessageSuggestion & {
type: "ENTITY_NOT_FOUND";
title: string;
} | {
message: any;
}) | (import("./types").MessageSuggestion & {
type: "INVALID_INPUT";
title: string;
} | {
message: any;
}) | (import("./types").MessageSuggestion & {
type: "INTERNAL_SERVER_ERROR";
title: string;
} | {
message: any;
}) | (import("./types").MessageSuggestion & {
type: "EMPLOYEE_INACTIVE_ON_CURRENT_BRANCH";
title: string;
} | {
message: any;
}) | (import("./types").MessageSuggestion & {
type: "BUSINESS_ERROR";
title: string;
} | {
message: any;
}) | (import("./types").MessageSuggestion & {
type: "ENTITY_IS_STILL_REFERENCED";
title: string;
} | {
message: any;
}) | (import("./types").MessageSuggestion & {
type: "DUPLICATED_ENTITY";
title: string;
};
});

@@ -80,2 +80,10 @@ "use strict";

},
CANNOT_FINISH_REQUEST_WITH_ORDER: {
type: 'CANNOT_FINISH_REQUEST_WITH_ORDER',
title: 'O.S. vinculada pendente',
message: [
'Não é possível finalizar uma solicitação de',
'serviço se ela possui uma ordem de serviço aberta'
].join(' ')
},
EMPLOYEE_INACTIVE_ON_CURRENT_BRANCH: {

@@ -82,0 +90,0 @@ type: 'EMPLOYEE_INACTIVE_ON_CURRENT_BRANCH',

import { ErrorResponse } from 'apollo-link-error';
import { ApolloError } from 'apollo-client';
export declare type ClientErrorTypes = 'SERVICE_OFFLINE' | 'CONNECTION_FAILED' | 'UNKNOWN_ERROR' | 'EMAIL_NOT_CONFIRMED' | 'EMAIL_ALREADY_EXISTS' | 'SCHEMA_UNKNOWN_FIELD';
export declare type ClientErrorTypes = 'SERVICE_OFFLINE' | 'CONNECTION_FAILED' | 'UNKNOWN_ERROR' | 'EMAIL_NOT_CONFIRMED' | 'EMAIL_ALREADY_EXISTS' | 'SCHEMA_UNKNOWN_FIELD' | 'CANNOT_FINISH_REQUEST_WITH_ORDER';
export declare type BackendErrorsWithProperties = {

@@ -31,3 +31,3 @@ ENTITY_IS_STILL_REFERENCED: {

export declare type GraphQLError = {
code: BackEndErrorTypes;
code: string;
message: string;

@@ -37,5 +37,4 @@ path: string[];

};
export declare type RawGraphQLError = ApolloError['graphQLErrors'][number];
export declare type ApolloErrorWithProps = Omit<ApolloError, 'graphQLErrors'> & {
graphQLErrors: ReadonlyArray<RawGraphQLError & {
graphQLErrors: ReadonlyArray<GraphQLError & {
properties: unknown;

@@ -42,0 +41,0 @@ }>;

{
"name": "@keepfy/error-extractor",
"version": "1.3.3",
"version": "1.3.4",
"description": "An error extractor package for keepfy frontend apps",

@@ -15,5 +15,5 @@ "main": "lib/index.js",

"scripts": {
"build": "rm -rf ./lib/* && yarn lint && tsc",
"build": "tsc",
"lint": "eslint 'src/**/*.ts?(x)'",
"prepare": "yarn build"
"prepare": "rm -rf ./lib/* && yarn lint && yarn build"
},

@@ -20,0 +20,0 @@ "peerDependencies": {

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