Permalink
Browse files

make sure server sends suitable error message

  • Loading branch information...
1 parent c99df7d commit 4c4dfdbef633e73d5351b30302ca8002fc50baa0 @dominictarr committed Jun 6, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 server.js
View
@@ -134,11 +134,13 @@ app.get('/:username/:project/:commit', function (req,res){
function summary(opts,res){
db.view('all/summary',opts, function (err,data){
-
+ if(err) {
+ console.error(err)
+ return res.send(err)
+ }
data.rows.sort(function (x,y){
return x.value.time < y.value.time ? 1 : -1
})
- if(err) return res.send(err)
res.render('user',data)
})

0 comments on commit 4c4dfdb

Please sign in to comment.