From 632ee1aa3a13a4a2e0ec7077a360f7231a242634 Mon Sep 17 00:00:00 2001 From: Igor Morozov Date: Wed, 20 Feb 2019 14:51:17 +0300 Subject: [PATCH] Add body to the HTTPError class According to this https://github.com/sindresorhus/got/blob/ada5861347cd59e59b537042f41f0572e13769d4/source/errors.ts#L96 HTTPError has response body in the body property --- types/got/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/got/index.d.ts b/types/got/index.d.ts index 0c847d6489..a9f289b831 100644 --- a/types/got/index.d.ts +++ b/types/got/index.d.ts @@ -36,6 +36,7 @@ declare class HTTPError extends StdError { statusCode: number; statusMessage: string; headers: http.IncomingHttpHeaders; + body: Buffer | string | object; } declare class MaxRedirectsError extends StdError {