error-handler-e2
Advanced tools
Comparing version 1.0.0 to 1.1.0
11
index.js
const error = (message, status) => { | ||
console.log(`Error: ${message} => with status code : ${status}`); | ||
let error_type; | ||
if (status >= 40 && status < 500) { | ||
error_type = "Client Error."; | ||
} else if(status >= 500 && status < 600){ | ||
error_type = " Server Error."; | ||
} else{ | ||
error_type = `${status}, it should not be a error status code`; | ||
} | ||
return { | ||
message, | ||
status, | ||
error_type, | ||
}; | ||
@@ -7,0 +16,0 @@ } |
{ | ||
"name": "error-handler-e2", | ||
"version": "1.0.0", | ||
"description": "", | ||
"version": "1.1.0", | ||
"description": "This is handle error package", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "", | ||
"scripts": {}, | ||
"author": "Milad E. Fahmy", | ||
"license": "ISC" | ||
} |
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
628
3
17
1
1
1
1
0