We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 943af7a commit 6ad6ce9Copy full SHA for 6ad6ce9
packages/render/integrations/nextjs/app/api/route.tsx
@@ -5,7 +5,11 @@ export async function GET() {
5
const html = await render(<div>testing element</div>, { pretty: true });
6
return new Response(html);
7
} catch (exception) {
8
- return new Response(JSON.stringify(exception), {
+ let message = 'Some error ocurred';
9
+ if (exception instanceof Error) {
10
+ message = exception.toString();
11
+ }
12
+ return new Response(message, {
13
status: 500,
14
});
15
}
0 commit comments