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

@bss-sbc/shopify-api-fetcher

Package Overview
Dependencies
Maintainers
3
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bss-sbc/shopify-api-fetcher - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

2

dist/graphql.js

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

super(message, options);
this.name = ` GraphqlError`;
this.name = `GraphqlError`;
}

@@ -15,0 +15,0 @@ }

{
"name": "@bss-sbc/shopify-api-fetcher",
"version": "2.0.3",
"version": "2.0.4",
"description": "",

@@ -11,3 +11,3 @@ "main": "dist/index.js",

"engines": {
"node": "^14.15.0 || ^16.0.0"
"node": ">=16.16.0"
},

@@ -14,0 +14,0 @@ "exports": {

# Shopify API Fetcher
_From: BSS Group > BSS Commerce > Division Shopify/Blockchain_
_From: BSS Group > BSS Commerce > Division SBC_

@@ -15,2 +15,51 @@ [![Node version](https://img.shields.io/node/v/@bss-sbc/shopify-api-fetcher.svg?style=flat)](https://nodejs.org/download/)

## Error Handling
`GraphqlError`
- If Graphql response status is not 2xx, throw GraphqlError
```javascript
new GraphqlError('', {
cause: {
status: shopifyResult.status,
errors: JSON_RESULT.errors,
userErrors: false,
cost: JSON_RESULT.extensions ? JSON_RESULT.extensions.cost : null,
},
})
```
- If throttled but not configured to retry, throw GraphqlError
```javascript
new GraphqlError('', {
cause: {
status: isThrottled ? 'throttled' : shopifyResult.status,
errors: JSON_RESULT.errors,
userErrors: false,
cost: JSON_RESULT.extensions ? JSON_RESULT.extensions.cost : null,
},
})
```
- If there are user errors, throw GraphqlError
```javascript
new GraphqlError('', {
cause: {
status: shopifyResult.status,
errors: false,
userErrors: JSON_RESULT.data[JSON_RESULT_FIRST_KEY].userErrors,
cost: JSON_RESULT.extensions ? JSON_RESULT.extensions.cost : null,
},
})
```
- If uncaught error, throw GraphqlError
```javascript
new GraphqlError('', { cause: shopifyError })
```
### Example

@@ -17,0 +66,0 @@

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