This is my contribution to Superalgos

This commit is contained in:
Luis Fernando Molina committed 2021-01-20 15:51:26 +01:00
1 parent f013baaaec
commit aed93f3d21
1 file changed
+11 -5
+11 -5
View File
@@ -611,7 +611,12 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE
placeholder: {}
}
respondWithDocsObject(docs, result.error)
try {
respondWithDocsObject(docs, result.error)
} catch (err) {
console.log('new errro ', err)
}
return
}
@@ -715,6 +720,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE
}
break
}
case 'Update': {
try {
const currentBranch = unescape(requestParameters[3])
@@ -853,15 +859,15 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE
text: error.code
}
}
let customResponse = {
result: global.CUSTOM_FAIL_RESPONSE.result,
docs: docs
}
respondWithContent(JSON.stringify(customResponse), httpResponse)
} catch(err) {
console.log(err)
} catch (err) {
console.log(err)
}
}