error-handler-e2
Advanced tools
Comparing version 2.1.2 to 2.1.3
const spec_errors = [ | ||
{ | ||
statusCode: 400, | ||
message: "Bad Request", | ||
message: "400 Bad Request", | ||
description: ` | ||
@@ -17,3 +17,3 @@ The request could not be understood by the server due to malformed syntax. | ||
statusCode: 401, | ||
message: "Unauthorized", | ||
message: "401 Unauthorized", | ||
description: ` | ||
@@ -44,3 +44,3 @@ The request requires user authentication. The response MUST include a | ||
statusCode: 402, | ||
message: "Payment Required", | ||
message: "402 Payment Required", | ||
description: ` | ||
@@ -60,3 +60,3 @@ This code is reserved for future use. | ||
statusCode: 403, | ||
message: "Forbidden", | ||
message: "403 Forbidden", | ||
description: ` | ||
@@ -82,3 +82,3 @@ The server understood the request, but is refusing to fulfill it. | ||
statusCode: 404, | ||
message: "Not Found", | ||
message: "404 Not Found", | ||
description: ` | ||
@@ -104,3 +104,3 @@ The server has not found anything matching the Request-URI. | ||
statusCode: 405, | ||
message: "Method Not Allowed", | ||
message: "405 Method Not Allowed", | ||
description: ` | ||
@@ -120,3 +120,3 @@ The method specified in the Request-Line is not allowed for | ||
statusCode: 406, | ||
message: 'Not Acceptable', | ||
message: '406 Not Acceptable', | ||
description: ` | ||
@@ -152,3 +152,3 @@ The resource identified by the request is only capable of generating | ||
statusCode: 407, | ||
message: 'Proxy Authentication Required', | ||
message: '407 Proxy Authentication Required', | ||
description: ` | ||
@@ -169,3 +169,3 @@ This code is similar to 401 (Unauthorized), but indicates that | ||
statusCode: 408, | ||
message: 'Request Timeout', | ||
message: '408 Request Timeout', | ||
description: ` | ||
@@ -185,3 +185,3 @@ The client did not produce a request within the time that the server | ||
statusCode: 409, | ||
message: `Conflict`, | ||
message: `409 Conflict`, | ||
description: ` | ||
@@ -214,3 +214,3 @@ The request could not be completed due to a conflict with the current | ||
statusCode: 410, | ||
message: `Gone`, | ||
message: `410 Gone`, | ||
description: ` | ||
@@ -247,3 +247,3 @@ The requested resource is no longer available at the server and | ||
statusCode: 411, | ||
message: `Length Required`, | ||
message: `411 Length Required`, | ||
description: ` | ||
@@ -262,3 +262,3 @@ The server refuses to accept the request without a defined | ||
statusCode: 412, | ||
message: `Precondition Failed`, | ||
message: `412 Precondition Failed`, | ||
description: ` | ||
@@ -265,0 +265,0 @@ The precondition given in one or more of the request-header |
{ | ||
"name": "error-handler-e2", | ||
"version": "2.1.2", | ||
"version": "2.1.3", | ||
"description": "This is handle error package", | ||
@@ -26,5 +26,5 @@ "main": "index.js", | ||
], | ||
"dependencies": { | ||
"devDependencies": { | ||
"mocha": "^8.0.1" | ||
} | ||
} |
@@ -14,3 +14,3 @@ # Error Handler E2 | ||
//or | ||
yarn add npm i error-handler-e2 | ||
yarn add error-handler-e2 | ||
@@ -23,13 +23,33 @@ const ErrorHandlerrE2 = require("error-handler-e2"); | ||
## Examples | ||
* Using Functions | ||
* create custom error | ||
### Using Functions | ||
1. create custom error | ||
``` | ||
const { functions } = require("error-handler-e2"); | ||
const myError =vfunction.customError({message: "Testing Error Message", | ||
statusCode: 404, {...options}}); | ||
const { customError } = require("error-handler-e2").functions; | ||
const myError = customError({ | ||
message: "testing erro", | ||
statusCode: 404, | ||
}); | ||
``` | ||
2. Logging Errors | ||
``` | ||
const { customError, logErrors } = require("error-handler-e2").functions; | ||
const myError = customError({ | ||
message: "testing erro", | ||
statusCode: 404, | ||
}); | ||
logErrors({ | ||
error: err, | ||
file: "index.js", | ||
path: `${__dirname}/${__filename}`, | ||
}); | ||
``` | ||
## Authors | ||
[Milad](<https://github.com/miladezzat>) |
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
20593
0
53
1
- Removedmocha@^8.0.1
- Removed@ungap/promise-all-settled@1.1.2(transitive)
- Removedansi-colors@4.1.1(transitive)
- Removedansi-regex@3.0.15.0.1(transitive)
- Removedansi-styles@4.3.0(transitive)
- Removedanymatch@3.1.3(transitive)
- Removedargparse@2.0.1(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbinary-extensions@2.3.0(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedbraces@3.0.3(transitive)
- Removedbrowser-stdout@1.3.1(transitive)
- Removedcamelcase@6.3.0(transitive)
- Removedchalk@4.1.2(transitive)
- Removedchokidar@3.5.1(transitive)
- Removedcliui@7.0.4(transitive)
- Removedcolor-convert@2.0.1(transitive)
- Removedcolor-name@1.1.4(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removeddebug@4.3.1(transitive)
- Removeddecamelize@4.0.0(transitive)
- Removeddiff@5.0.0(transitive)
- Removedemoji-regex@8.0.0(transitive)
- Removedescalade@3.2.0(transitive)
- Removedescape-string-regexp@4.0.0(transitive)
- Removedfill-range@7.1.1(transitive)
- Removedfind-up@5.0.0(transitive)
- Removedflat@5.0.2(transitive)
- Removedfs.realpath@1.0.0(transitive)
- Removedfsevents@2.3.3(transitive)
- Removedget-caller-file@2.0.5(transitive)
- Removedglob@7.1.6(transitive)
- Removedglob-parent@5.1.2(transitive)
- Removedgrowl@1.10.5(transitive)
- Removedhas-flag@4.0.0(transitive)
- Removedhe@1.2.0(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedis-binary-path@2.1.0(transitive)
- Removedis-extglob@2.1.1(transitive)
- Removedis-fullwidth-code-point@2.0.03.0.0(transitive)
- Removedis-glob@4.0.3(transitive)
- Removedis-number@7.0.0(transitive)
- Removedis-plain-obj@2.1.0(transitive)
- Removedisexe@2.0.0(transitive)
- Removedjs-yaml@4.0.0(transitive)
- Removedlocate-path@6.0.0(transitive)
- Removedlog-symbols@4.0.0(transitive)
- Removedminimatch@3.0.4(transitive)
- Removedmocha@8.4.0(transitive)
- Removedms@2.1.22.1.3(transitive)
- Removednanoid@3.1.20(transitive)
- Removednormalize-path@3.0.0(transitive)
- Removedonce@1.4.0(transitive)
- Removedp-limit@3.1.0(transitive)
- Removedp-locate@5.0.0(transitive)
- Removedpath-exists@4.0.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedpicomatch@2.3.1(transitive)
- Removedrandombytes@2.1.0(transitive)
- Removedreaddirp@3.5.0(transitive)
- Removedrequire-directory@2.1.1(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedserialize-javascript@5.0.1(transitive)
- Removedstring-width@2.1.14.2.3(transitive)
- Removedstrip-ansi@4.0.06.0.1(transitive)
- Removedstrip-json-comments@3.1.1(transitive)
- Removedsupports-color@7.2.08.1.1(transitive)
- Removedto-regex-range@5.0.1(transitive)
- Removedwhich@2.0.2(transitive)
- Removedwide-align@1.1.3(transitive)
- Removedworkerpool@6.1.0(transitive)
- Removedwrap-ansi@7.0.0(transitive)
- Removedwrappy@1.0.2(transitive)
- Removedy18n@5.0.8(transitive)
- Removedyargs@16.2.0(transitive)
- Removedyargs-parser@20.2.4(transitive)
- Removedyargs-unparser@2.0.0(transitive)
- Removedyocto-queue@0.1.0(transitive)