Skip to content

Commit

Permalink
Log /name-shame/ request errors to console and return an HTTP 500 error
Browse files Browse the repository at this point in the history
  • Loading branch information
joelpurra committed Apr 29, 2014
1 parent 605a4e1 commit e0237d9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/web.js
Expand Up @@ -63,7 +63,13 @@ app.get("/name-shame/", function(request, response, next) {
}

function handleError(error) {
throw error;
// TODO: log this error in a better way
//throw error;
console.error("handleError", error);

// TODO: make a prettier error message, maybe with some limited information
response.send(500);
response.end();
}

var domainname = checkAndCleanDomainname(request.query.domainname);
Expand Down

0 comments on commit e0237d9

Please sign in to comment.