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

error-handler-e2

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

error-handler-e2 - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

README.md

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 @@ }

10

package.json
{
"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"
}
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