fix(rest): proxy 204 response remove from queue (#545)

Co-authored-by: ayntee <ayyantee@gmail.com>
This commit is contained in:
ITOH
2021-02-25 19:52:25 +01:00
committed by GitHub
parent ea42687623
commit 369c3d0ce2

View File

@@ -93,6 +93,8 @@ export async function processQueue(id: string) {
// SOMETIMES DISCORD RETURNS AN EMPTY 204 RESPONSE THAT CAN'T BE MADE TO JSON
if (response.status === 204) {
restCache.eventHandlers.fetchSuccess(queuedRequest.payload);
// REMOVE FROM QUEUE
queue.shift();
queuedRequest.request.respond({ status: 204 });
} else {
// CONVERT THE RESPONSE TO JSON