@@ -44,7 +44,11 @@ module.exports = ClsiManager =
if err?
logger.err err:err, project_id:project_id, url:opts?.url, "error making request to clsi"
return callback(err)
- ClsiCookieManager.setServerId project_id, response, callback
+ ClsiCookieManager.setServerId project_id, response, (err)->
+ if err?
+ logger.warn err:err, project_id:project_id, "error setting server id"
+
+ return callback err, response, body
_getCompilerUrl: (compileGroup) ->
@@ -33,7 +33,7 @@ module.exports = CompileController =
CompileManager.compile project_id, user_id, options, (error, status, outputFiles, output, limits) ->
return next(error) if error?
res.contentType("application/json")
- res.send 200, JSON.stringify {
+ res.status(200).send JSON.stringify {
status: status
outputFiles: outputFiles
compileGroup: limits?.compileGroup
@@ -63,6 +63,10 @@ class MockResponse
@body = body if body
@callback() if @callback?
+ status: (@statusCode)->
+ return @
setHeader: (header, value) ->
@headers[header] = value