Skip to content

Commit 0060a42

Browse files
committed
revert(http_requests): revert back to .then method
Signed-off-by: k-kumar-01 <[email protected]>
1 parent 3851ea3 commit 0060a42

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/lib/http-requests.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,12 @@ class HttpRequests {
5353
}
5454

5555
try {
56-
const response: Response = await httpResponseErrorHandler(
57-
await fetch(constructURL.toString(), {
58-
...config,
59-
method,
60-
body: JSON.stringify(body),
61-
headers: this.headers,
62-
})
63-
)
56+
const response: Response = await fetch(constructURL.toString(), {
57+
...config,
58+
method,
59+
body: JSON.stringify(body),
60+
headers: this.headers,
61+
}).then((res) => httpResponseErrorHandler(res))
6462
const parsedBody: string = await response.text()
6563

6664
try {

0 commit comments

Comments
 (0)