fix: cleaner components seperation

This commit is contained in:
shahdlala66
2026-04-18 21:39:16 +02:00
parent 3e8c7c4057
commit 8b090e4d96
6 changed files with 316 additions and 268 deletions
+8
View File
@@ -0,0 +1,8 @@
export function getErrorMessage(error: unknown, fallback: string): string {
if (!error || typeof error !== 'object') {
return fallback;
}
const httpError = error as { error?: { message?: unknown } };
return typeof httpError.error?.message === 'string' ? httpError.error.message : fallback;
}