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;
}
