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

screenshotone-errors

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

screenshotone-errors - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

dist/@types/main.d.ts

@@ -10,4 +10,4 @@ declare enum ErrorCode {

}
export declare function APIErrorByCode(code: string): ErrorCode | null;
export declare function APIErrorByCode(code: string): APIError | null;
export declare function APIError(code: ErrorCode): APIError;
export {};

@@ -8,3 +8,3 @@ "use strict";

})(ErrorCode || (ErrorCode = {}));
const Errors = {
const allErrors = {
[ErrorCode.Timeout]: {

@@ -18,4 +18,4 @@ HTTPStatusCode: 500,

function APIErrorByCode(code) {
if (code in Errors) {
return code;
if (code in allErrors) {
return allErrors[code];
}

@@ -26,4 +26,4 @@ return null;

function APIError(code) {
return Errors[code];
return allErrors[code];
}
exports.APIError = APIError;
{
"name": "screenshotone-errors",
"homepage": "https://screenshotone.com",
"version": "1.0.1",
"version": "1.0.2",
"description": "Errors produced by the ScreenshotOne API.",

@@ -6,0 +6,0 @@ "repository": {

@@ -12,3 +12,3 @@ enum ErrorCode {

const Errors: Record<ErrorCode, APIError> = {
const allErrors: Record<ErrorCode, APIError> = {
[ErrorCode.Timeout]: {

@@ -24,4 +24,4 @@ HTTPStatusCode: 500,

export function APIErrorByCode(code: string) {
if ((code as ErrorCode) in Errors) {
return code as ErrorCode;
if ((code as ErrorCode) in allErrors) {
return allErrors[code as ErrorCode];
}

@@ -33,3 +33,3 @@

export function APIError(code: ErrorCode) {
return Errors[code];
return allErrors[code];
}
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