export class RequestError extends Error {

  response: any;

  constructor(response: any) {
    super(response.message);
    this.response = response;
    // Set the prototype explicitly.
    Object.setPrototypeOf(this, RequestError.prototype);
  }

  getResponse(): any {
    return this.response;
  }
}