fix(RequestHandler): only reset tokens for authenticated 401s (#7508)

This commit is contained in:
Vlad Frangu
2022-03-06 21:43:12 +02:00
committed by GitHub
parent c12d61a342
commit b9ff7b0573
6 changed files with 50 additions and 25 deletions

View File

@@ -1,13 +1,14 @@
import type { RequestInit } from 'node-fetch';
import type { InternalRequest, RouteData } from '../RequestManager';
import type { HandlerRequestData, RouteData } from '../RequestManager';
export interface IHandler {
queueRequest: (
routeId: RouteData,
url: string,
options: RequestInit,
bodyData: Pick<InternalRequest, 'files' | 'body'>,
requestData: HandlerRequestData,
) => Promise<unknown>;
readonly inactive: boolean;
// eslint-disable-next-line @typescript-eslint/method-signature-style -- This is meant to be a getter returning a bool
get inactive(): boolean;
readonly id: string;
}