import { GeneralException } from '@self/utils/error'; interface ErrorMessageProps { error: Error; } export function ErrorMessage({ error }: ErrorMessageProps) { if (error instanceof GeneralException && error.type === 'unauthorized') { return (
{error.title}
{typeof error.detail === 'string' && error.detail.length > 0 && ({error.detail}
)}{error.title}
{typeof error.detail === 'string' && error.detail.length > 0 && (
{error.detail}
{error.name}: {error.message}