Gérard Le Cloerec 0545984342 (feat): create aquilacms provider
(style): replace all bigcommerce name by aquilacms
2021-03-23 14:42:05 +01:00

26 lines
544 B
TypeScript

import type { Response } from '@vercel/fetch'
// Used for GraphQL errors
export class AquilacmsGraphQLError extends Error {}
export class AquilacmsApiError extends Error {
status: number
res: Response
data: any
constructor(msg: string, res: Response, data?: any) {
super(msg)
this.name = 'AquilacmsApiError'
this.status = res.status
this.res = res
this.data = data
}
}
export class AquilacmsNetworkError extends Error {
constructor(msg: string) {
super(msg)
this.name = 'AquilacmsNetworkError'
}
}