Skip to content

Commit

Permalink
Should abort with all 4xx status
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethormandy committed Nov 28, 2015
1 parent c067c8c commit 1d99d3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/middleware/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ module.exports = function(req, next){
// done
handshake.on("end", next)

handshake.on("response", function(rsp){
if (rsp.statusCode == 403) {
handshake.on("response", function (rsp) {
if (parseInt(rsp.statusCode.toString()[0], 10) === 4) {
helpers.log()
helpers.log(" Aborted".yellow + " - you must be granted access to publish to", req.domain)
helpers.log()
Expand Down

1 comment on commit 1d99d3e

@sintaxi
Copy link
Owner

@sintaxi sintaxi commented on 1d99d3e Jan 3, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There could be other reasons someone could be denied access to publish. 403 lets the user know specifically that they are authenticated but do not have authorization to publish to the resource.

Please sign in to comment.