UNPKG

@spree/storefront-api-v2-sdk

Version:

Node module to easily integrate your JavaScript or TypeScript application with Spree API V2. You can create an entirely custom Storefront in JS/TS with this package including one page checkout, Single Page Apps, PWAs and so on

19 lines (16 loc) 617 B
import type { RawFetchRequest } from '../interfaces/RawFetchRequest' import type { RawFetchResponse } from '../interfaces/RawFetchResponse' import SpreeSDKError from './SpreeSDKError' export default class FetchError extends SpreeSDKError { public response?: RawFetchResponse public request?: RawFetchRequest public data?: any constructor(response?: RawFetchResponse, request?: unknown, data?: unknown, message?: string) { super(message) Object.setPrototypeOf(this, FetchError.prototype) this.name = 'FetchError' this.response = response this.request = request this.data = data } }