import { ApiResponseType } from 'rest-api-handler'; import EndomondoException from './EndomondoException'; /** * Endomondo API Exception */ export default class EndomondoApiException extends EndomondoException { protected response: ApiResponseType; /** * Constructor. */ public constructor(response: ApiResponseType) { super(JSON.stringify(response.data)); this.response = response; } public getResponse(): ApiResponseType { return this.response; } public getRequest(): Request { return this.response.request; } }