function returnJSONErrorWithMsg()

in Modules/common.js [106:116]


function returnJSONErrorWithMsg(code, message, callback) {
    var msg = {
        "error": message
    };
    var response = {
        statusCode: 400,
        headers: {"content-type": "application/json", "cache-control": "no-store"},
        body: JSON.stringify(msg),
    };
    callback(null, response);
}