Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

When piping to a response, and an error occurs, end the response

  • Loading branch information...
commit a44288df8f0ff893f7139267822657dae961a8f9 1 parent 84ffd3a
@naholyr naholyr authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 main.js
View
4 main.js
@@ -72,10 +72,10 @@ function File (options) {
) {
if (err.code === 'ENOENT') {
self.dest.statusCode = 404
- self.end('Not Found')
+ self.dest.end('Not Found')
} else {
self.dest.statusCode = 500
- self.end(err.message)
+ self.dest.end(err.message)
}
return
}
Please sign in to comment.
Something went wrong with that request. Please try again.