UNPKG

inventora-shopify-admin-api

Version:

Shopify Admin API is a NodeJS library built to help developers easily authenticate and make calls against the Shopify API. It was inspired by and borrows heavily from ShopifySharp.

31 lines (30 loc) 784 B
export type ErrorType1 = { errors: string; }; export type ErrorType2 = { errors: { [index: string]: string | string[]; }; }; export type ErrorType3 = { error: string; error_description: string; }; export declare class ShopifyError extends Error { body: ErrorType1 | ErrorType2 | ErrorType3; constructor(response: { status: number; statusText: string; }, body: ErrorType1 | ErrorType2 | ErrorType3); get isShopifyPrime(): boolean; /** * True when the requesting application has made too many requests and reached Shopify's API rate limit. */ apiRateLimitReached: boolean; statusCode: number; statusText: string; errors: { [index: string]: string[]; }; } export default ShopifyError;