@usekana/client-kana-js
Version:
Kana frontend JavaScript client
30 lines (25 loc) • 679 B
text/typescript
export class EmptyArgumentError extends Error {
constructor(argName: string) {
super(`"${argName}" cannot be empty`);
this.name = this.constructor.name;
}
}
export class AuthenticationError extends Error {
constructor(message: string) {
super(message);
this.name = this.constructor.name;
}
}
export class NetworkError extends Error {
constructor(message: string) {
super(message);
this.name = this.constructor.name;
}
}
export type RequestError = AuthenticationError | NetworkError | Error;
export class FeatureNotFoundError extends Error {
constructor(message: string) {
super(message);
this.name = this.constructor.name;
}
}