Avoid TypeError: Object #
<ServerResponse> has no method 'serverError' error when failing to parse JSON