Przeglądaj źródła

respect the status code on the error if it exists

Henry Oswald 12 lat temu
rodzic
commit
b8335b6b64
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      services/clsi/app.coffee

+ 1 - 1
services/clsi/app.coffee

@@ -62,7 +62,7 @@ app.get "/health_check", (req, res)->
 
 app.use (error, req, res, next) ->
 	logger.error err: error, "server error"
-	res.send 500
+	res.send err?.statusCode || 500
 
 app.listen port = (Settings.internal?.clsi?.port or 3013), host = (Settings.internal?.clsi?.host or "localhost"), (error) ->
 	logger.log "CLSI listening on #{host}:#{port}"