Explorar o código

respect the status code on the error if it exists

Henry Oswald %!s(int64=12) %!d(string=hai) anos
pai
achega
b8335b6b64
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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}"