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}

)}
); } if (error instanceof GeneralException) { return (

{error.title}

{typeof error.detail === 'string' && error.detail.length > 0 && (
Show error details
							{error.detail}
						
)}
); } return (

{error.name}: {error.message}

); }