mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-18 00:09:41 +02:00
♻️ refactor: remove duplicated code (Quick Wins)
- Delete unused Input.svelte from Picture app (70 LOC) - Remove sleep() from shared-api-client, import from shared-utils - Fix NodeJS.Timeout type for browser compatibility Part of consolidation effort - see docs/CONSOLIDATION_OPPORTUNITIES.md Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
0a6a1dcd1a
commit
1348fca84d
6 changed files with 9 additions and 78 deletions
|
|
@ -11,8 +11,8 @@ import {
|
|||
getErrorCodeFromStatus,
|
||||
isRetryableError,
|
||||
parseErrorResponse,
|
||||
sleep,
|
||||
} from './utils';
|
||||
import { sleep } from '@manacore/shared-utils';
|
||||
|
||||
const DEFAULT_TIMEOUT = 30000;
|
||||
const DEFAULT_RETRIES = 0;
|
||||
|
|
|
|||
|
|
@ -59,13 +59,6 @@ export async function parseErrorResponse(response: Response): Promise<string> {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sleep utility for retry delays
|
||||
*/
|
||||
export function sleep(ms: number): Promise<void> {
|
||||
return new Promise((resolve) => setTimeout(resolve, ms));
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if error is retryable (network issues, 5xx errors)
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue