Fix review queue pagination and API fallback handling
This commit is contained in:
@@ -25,7 +25,7 @@ export class ApiError extends Error {
|
||||
}
|
||||
|
||||
export async function api<T>(path: string): Promise<T> {
|
||||
const response = await fetch(`${base}${path}`);
|
||||
const response = await fetch(`${base}${path}`, { signal: AbortSignal.timeout(8000) });
|
||||
if (!response.ok) throw new ApiError(response.status);
|
||||
return response.json() as Promise<T>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user