Skip to content

Commit

Permalink
Make sure we have a request body.
Browse files Browse the repository at this point in the history
  • Loading branch information
ghengeveld committed Nov 23, 2020
1 parent d07c22d commit 99160ef
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/core/src/server/dev-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,11 @@ const startManager = async ({
});

router.post('/runtime-error', (request, response) => {
logger.error('Runtime error! Check your browser console.');
logger.error(request.body.error.stack || request.body.message);
if (request.body.origin === 'manager') clearManagerCache(options.cache);
if (request.body?.error) {
logger.error('Runtime error! Check your browser console.');
logger.error(request.body.error.stack || request.body.message);
if (request.body.origin === 'manager') clearManagerCache(options.cache);
}
response.sendStatus(200);
});

Expand Down

0 comments on commit 99160ef

Please sign in to comment.