Commit 15656259603f9d8fe62306636d08661073609fd1
Fix error handling
Charles Lehner committed on 10/9/2016, 9:08:04 PMParent: 17902b87345bd7f2aea48ec1a1863920ff23829a
Files changed
lib/repos/pulls.js | changed |
lib/repos/pulls.js | |||
---|---|---|---|
@@ -89,12 +89,12 @@ | |||
89 | 89 … | ||
90 | 90 … | P.renderPullReqCommits = function (req, pr, baseRepo, headRepo, cb) { | |
91 | 91 … | var self = this | |
92 | 92 … | self.web.pullReqs.getRevs(pr.id, function (err, revs) { | |
93 | - if (err) return cb(null, self.web.renderError(err)) | ||
93 … | + if (err) return cb(err) | ||
94 | 94 … | GitRepo.getMergeBase(baseRepo, revs.base, headRepo, revs.head, | |
95 | 95 … | function (err, mergeBase) { | |
96 | - if (err) return cb(null, self.web.renderError(err)) | ||
96 … | + if (err) return cb(err) | ||
97 | 97 … | cb(null, cat([ | |
98 | 98 … | pull.once('<section>'), | |
99 | 99 … | self.renderCommitLog(req, baseRepo, mergeBase, headRepo, revs.head), | |
100 | 100 … | pull.once('</section>') | |
@@ -106,12 +106,12 @@ | |||
106 | 106 … | ||
107 | 107 … | P.renderPullReqFiles = function (req, pr, baseRepo, headRepo, cb) { | |
108 | 108 … | var self = this | |
109 | 109 … | self.web.pullReqs.getRevs(pr.id, function (err, revs) { | |
110 | - if (err) return cb(null, self.web.renderError(err)) | ||
110 … | + if (err) return cb(err) | ||
111 | 111 … | GitRepo.getMergeBase(baseRepo, revs.base, headRepo, revs.head, | |
112 | 112 … | function (err, mergeBase) { | |
113 | - if (err) return cb(null, self.web.renderError(err)) | ||
113 … | + if (err) return cb(err) | ||
114 | 114 … | cb(null, cat([ | |
115 | 115 … | pull.once('<section>'), | |
116 | 116 … | self.repo.renderDiffStat(req, | |
117 | 117 … | [baseRepo, headRepo], [mergeBase, revs.head]), |
Built with git-ssb-web