Not all slots catch errors when using parallel routes
Unanswered
American Shorthair posted this in #help-forum
American ShorthairOP
Some slots catch errors but some do not, it is very weird is it suppose to behave like this?
3 Replies
American ShorthairOP
Same code in comments, feedback and users just changed text
But for some reason feedback and users catches the error but comments does not, makes no sense ;/. and this parallel routes are very buggy when I add new slot and include in layout it does not reflect changes on the dev server I have to restart the server again by
npm run devfeedback code
error.tsx code
import React from "react";
const Feedback = () => {
throw new Error("Feedback error");
return <div>Feedback</div>;
};
export default Feedback;error.tsx code
"use client";
const ErrorBoundary = ({ error }: { error: Error }) => {
return <div>{error.message}</div>;
};
export default ErrorBoundary;