diff --git a/services/spelling/app/coffee/HealthCheckController.coffee b/services/spelling/app/coffee/HealthCheckController.coffee index c4f847f46d..504529bd93 100644 --- a/services/spelling/app/coffee/HealthCheckController.coffee +++ b/services/spelling/app/coffee/HealthCheckController.coffee @@ -12,7 +12,8 @@ module.exports = language: "en" timeout: 1000 * 20 request.post opts, (err, response, body)-> - console.log body?.misspellings?[0]?.suggestions.length + if err? + return res.sendStatus 500 numberOfSuggestions = body?.misspellings?[0]?.suggestions?.length if numberOfSuggestions > 10 logger.log "health check passed"