Skip to content

Commit c5723b4

Browse files
committed
tidy up, remove console logs
1 parent f62d71e commit c5723b4

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 1.2.1
4+
5+
- Tidy up, removes console logs
6+
37
## 1.2.0
48

59
- Swops `node-fetch` for `cross-fetch` for server and browser fetching support in one.

dist/request.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ const request = (method, user, period, limit) => __awaiter(void 0, void 0, void
2929
return res.json();
3030
})
3131
.then((json) => json)
32-
.catch((error) => console.log('🔥 Uh oh...', error)));
32+
.catch((error) => {
33+
throw new Error(error);
34+
}));
3335
});
3436
exports.default = request;

src/request.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ const request = async <Response>(
2626
return res.json();
2727
})
2828
.then((json) => json)
29-
.catch((error) => console.log('🔥 Uh oh...', error))) as Response;
29+
.catch((error) => {
30+
throw new Error(error);
31+
})) as Response;
3032
};
3133

3234
export default request;

0 commit comments

Comments
 (0)