Skip to content

Commit 77b6a7d

Browse files
authored
fix(Util): throw token invalid for fetching rec. shard amount (#4779)
1 parent aa25608 commit 77b6a7d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/util/Util.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ class Util {
244244
})
245245
.then(res => {
246246
if (res.ok) return res.json();
247+
if (res.status === 401) throw new DiscordError('TOKEN_INVALID');
247248
throw res;
248249
})
249250
.then(data => data.shards * (1000 / guildsPerShard));

0 commit comments

Comments
 (0)