Custom Error Handler
Unanswered
Seppala Siberian Sleddog posted this in #help-forum
Seppala Siberian SleddogOP
Can I use the
I want something like this to evalute to true
error.tsx
file to handle custom errors, as it seems to be it accepts only object from the Error type only?I want something like this to evalute to true
export interface ErrorProps {
error: Error & {
digest?: string;
};
reset: () => void;
}
const Error: React.FC<ErrorProps> = ({ error }) => {
console.log(error instanceof CustomError);
};