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

restle-error

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

restle-error - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

33

index.js

@@ -11,14 +11,13 @@ const RestleError = require('./restle-error');

this.name = `AdapterError`;
this.title = `Adapter failed to connect`
this.title = `Adapter failed to connect`;
this.detail = `The ${type} adapter failed to properly connect. Reason: ${reason}`;
}
NotFoundError = function(options) {
const type = options.type;
const id = options.id;
BadRequestError = function(options) {
const detail = options.detail;
this.status = 404;
this.name = 'NotFoundError';
this.title = `Resource not found`,
this.detail = `A resource with type '${type}' and id '${id}' was not found.`;
this.status = 400;
this.name = 'BadRequestError';
this.title = 'Bad request';
this.detail = detail;
}

@@ -32,14 +31,26 @@

this.name = `ConflictError`;
this.title = `Conflicting values`,
this.title = `Conflicting values`;
this.detail = `Tried to perform an operation on mismatched types: ${first} and ${second}`;
}
NotFoundError = function(options) {
const type = options.type;
const id = options.id;
this.status = 404;
this.name = 'NotFoundError';
this.title = `Resource not found`;
this.detail = `A resource with type '${type}' and id '${id}' was not found.`;
}
util.inherits(AdapterError, RestleError);
util.inherits(BadRequestError, RestleError);
util.inherits(ConflictError, RestleError);
util.inherits(NotFoundError, RestleError);
util.inherits(ConflictError, RestleError);
module.exports = {
AdapterError: AdapterError,
BadRequestError: AdapterError,
ConflictError: ConflictError,
NotFoundError: NotFoundError,
ConflictError: ConflictError,
}
{
"name": "restle-error",
"version": "0.0.1",
"version": "0.0.2",
"description": "Restle errors.",

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