12 lines
319 B
TypeScript
12 lines
319 B
TypeScript
export type ClientErrorReason = "Transport" | "UnexpectedStatus" | "UnsupportedContentType" | "MalformedResponse"
|
|
|
|
export class ClientError extends Error {
|
|
override readonly name = "ClientError"
|
|
constructor(
|
|
readonly reason: ClientErrorReason,
|
|
options?: ErrorOptions,
|
|
) {
|
|
super(reason, options)
|
|
}
|
|
}
|