Skip to content

Commit

Permalink
add error status code to logs
Browse files Browse the repository at this point in the history
  • Loading branch information
rinej committed Sep 12, 2024
1 parent 954ac8c commit d86df16
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/libs/Network/SequentialQueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import * as NetworkStore from './NetworkStore';
type RequestError = Error & {
name?: string;
message?: string;
status?: string;
};

let resolveIsReadyPromise: ((args?: unknown[]) => void) | undefined;
Expand Down
2 changes: 1 addition & 1 deletion src/libs/RequestThrottle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function sleep(error: RequestError, command: string): Promise<void> {
if (requestRetryCount <= CONST.NETWORK.MAX_REQUEST_RETRIES) {
const currentRequestWaitTime = getRequestWaitTime();
Log.info(
`[RequestThrottle] Retrying request after error: '${error.name}', '${error.message}'. Command: ${command}. Retry count: ${requestRetryCount}. Wait time: ${currentRequestWaitTime}`,
`[RequestThrottle] Retrying request after error: '${error.name}', '${error.message}', '${error.status}'. Command: ${command}. Retry count: ${requestRetryCount}. Wait time: ${currentRequestWaitTime}`,
);
setTimeout(resolve, currentRequestWaitTime);
return;
Expand Down

0 comments on commit d86df16

Please sign in to comment.