import React from 'react'; const ErrorBox: React.FC<{ readonly error: Error; readonly cause?: boolean; }> = ({error, cause}) => { const {message} = error; const splitted = error.stack ? error.stack.split('\n') : [error.message]; const deduplicated = splitted[0].includes(message) ? splitted.slice(1) : splitted; const combined = [`${error.name}: ${message}`, ...deduplicated]; return (
{cause ? (
Caused by:
) : null}
{combined?.map((line, index) => (
{line}
))}
); }; export const ErrorState: React.FC<{ readonly error: Error; }> = ({error}) => { return ( <>
Unfortunately, the conversion failed:
{error.cause ? ( <>
) : null}
Report this issue on{' '} remotion.dev/report {' '} and upload the video. We'll try our best to help!
); };