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

oh-my-errors

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oh-my-errors - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

1

lib/errorTypes/Error.js

@@ -16,3 +16,2 @@ /*

constructor (error) {
this.error = true
this.type = null

@@ -19,0 +18,0 @@ this.code = null

4

lib/errorTypes/UnauthorizedError.js

@@ -9,5 +9,3 @@ const Error = require('./Error')

super.setType('unAuthorized')
super.setSolutions([
solutions.relogin()
])
super.setSolutions(data.solutions)
}

@@ -14,0 +12,0 @@ }

@@ -40,6 +40,19 @@ const solutions = require('./Solutions/Solutions')

origin: data.origin,
message: data.message
message: data.message,
solutions: [
solutions.relogin()
]
})
}
createUnauthorizedDemoError401 (data) {
return new UnauthorizedError({
origin: data.origin,
message: data.message,
solutions: [
solutions.createAccount()
]
})
}
createForbiddenError403 (data) {

@@ -46,0 +59,0 @@ return new ForbiddenError({

@@ -20,2 +20,8 @@ class Solutions {

createAccount () {
return {
type: 'createAccount'
}
}
// Contact support team

@@ -22,0 +28,0 @@ contact () {

{
"name": "oh-my-errors",
"version": "1.0.4",
"version": "1.0.5",
"description": "Simple node module to handle multiple server-side errors with solution strategies",

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

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