refactor(frontend): extract extractErrorCode() helper to eliminate repeated type assertions #649
@@ -26,7 +26,6 @@ export function createApiClient(fetch: typeof globalThis.fetch) {
|
|||||||
|
|
||||||
export interface ApiError {
|
export interface ApiError {
|
||||||
code?: string;
|
code?: string;
|
||||||
message?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function extractErrorCode(error: unknown): string | undefined {
|
export function extractErrorCode(error: unknown): string | undefined {
|
||||||
|
|||||||
Reference in New Issue
Block a user