change: prettier code

This commit is contained in:
Skillz4Killz
2021-10-07 15:06:03 +00:00
committed by GitHub Action
parent a9e5ce01c9
commit 3878115640
3 changed files with 27 additions and 25 deletions
+6 -2
View File
@@ -34,7 +34,9 @@ export async function processQueue(rest: RestManager, id: string) {
}
// IF A BUCKET EXISTS, CHECK THE BUCKET'S RATE LIMITS
const bucketResetIn = queuedRequest.payload.bucketId ? rest.checkRateLimits(rest, queuedRequest.payload.bucketId) : false;
const bucketResetIn = queuedRequest.payload.bucketId
? rest.checkRateLimits(rest, queuedRequest.payload.bucketId)
: false;
// THIS BUCKET IS STILL RATELIMITED, RE-ADD TO QUEUE
if (bucketResetIn) continue;
@@ -71,7 +73,9 @@ export async function processQueue(rest: RestManager, id: string) {
}
if (response.status < 200 || response.status >= 400) {
rest.debug(`[REST - httpError] Payload: ${JSON.stringify(queuedRequest.payload)} | Response: ${JSON.stringify(response)}`);
rest.debug(
`[REST - httpError] Payload: ${JSON.stringify(queuedRequest.payload)} | Response: ${JSON.stringify(response)}`
);
let error = "REQUEST_UNKNOWN_ERROR";
switch (response.status) {
+5 -1
View File
@@ -9,7 +9,11 @@ export async function runMethod<T = any>(
retryCount = 0,
bucketId?: string
): Promise<T> {
rest.debug(`[REST - RequestCreate] Method: ${method} | URL: ${url} | Retry Count: ${retryCount} | Bucket ID: ${bucketId} | Body: ${JSON.stringify(body)}`)
rest.debug(
`[REST - RequestCreate] Method: ${method} | URL: ${url} | Retry Count: ${retryCount} | Bucket ID: ${bucketId} | Body: ${JSON.stringify(
body
)}`
);
const errorStack = new Error("Location:");
// @ts-ignore Breaks deno deploy. Luca said add tsignore until it's fixed