hc-sdk
Version:
hc-sdk is a library for working with the HuaChain Horizon server.
33 lines (28 loc) • 709 B
JavaScript
export class NetworkError extends Error {
constructor(message, response) {
super(message);
this.constructor = NetworkError;
this.response = response;
}
getResponse() {
return this.response;
}
}
export class NotFoundError extends NetworkError {
constructor(message, response) {
super(message, response);
this.constructor = NotFoundError;
}
}
export class BadRequestError extends NetworkError {
constructor(message, response) {
super(message, response);
this.constructor = BadRequestError;
}
}
export class BadResponseError extends NetworkError {
constructor(message, response) {
super(message, response);
this.constructor = BadResponseError;
}
}