UNPKG

@scayle/storefront-core

Version:

Collection of essential utilities to work with the Storefront API

13 lines (12 loc) 326 B
export class FetchError extends Error { response; data; constructor(response, data) { const message = `Failed to fetch ${response.url}. ${response.status} ${response.statusText}`; super(message); this.response = response; this.data = data; this.name = "FetchError"; this.message = message; } }