Fix review queue pagination and API fallback handling
This commit is contained in:
1 parent
ddb6909c4d
commit
1f63f71600
11 files changed
+93
-6
No files matched your search
@@ -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