Skip to content

Commit

Permalink
Merge pull request #225 from hzerrad/feature/destination/shopify
Browse files Browse the repository at this point in the history
  • Loading branch information
paulkr authored Mar 7, 2023
2 parents 301888a + b594088 commit 3c5504b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions catalog/destinations/shopify/shopify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,13 @@ export class ShopifyDriver implements DestinationClassI {
throw new Error("[Shopify] The selected action is not supported");
}

const { errors } = err.response.data as any;

if (err.response.status === 400) {
const { errors } = err.response.data as any;
throw new Error(`[Shopify] Bad Request: ${JSON.stringify(errors)}`);
}

throw new Error(`[Shopify] An error occurred while contacting Shopify API: ${JSON.stringify(errors) || err.message}`);
}

throw err;
Expand Down Expand Up @@ -152,8 +155,8 @@ export default function getProxyDriver(config: AnyObject) {
});
} else {
method = extractMethod(rest[1]);

const secondaryResource = rest[0];

path = composeUriSuffix({
resource,
secondaryResource,
Expand Down

0 comments on commit 3c5504b

Please sign in to comment.