Replies: 2 comments 4 replies
-
I think you want https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary |
Beta Was this translation helpful? Give feedback.
-
There is no such thing as invalid markdown content, remark/react-markdown by itself should not be able to error, but a plugin could have an error.
500 error? Is the markdown being rendered server side?
Do you have access to the browser or server logs? Those would have the most detailed information
https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary is one option as @wooorm mentioned. For example, an almost-link (missing an [example](example.com [example](example.com |
Beta Was this translation helpful? Give feedback.
-
I am using ReactMarkdown as follow:
sometimes the MD content has issues and cannot be parsed properly but all I get on my end is a 500 error and no clues about what the issue could be so it can be fixed. Is there a way to print out why ReactMarkdown failed to render properly? I could send the errors out to the console (
console.log
) or I can send it to the page as a string so it can be render and I know exactly what is wrong with the MD content, can I get some hints in how to achieve this?Beta Was this translation helpful? Give feedback.
All reactions