WH.doHandle = function()

in src/main/resources/buildServerResources/gh-webhook.js [259:276]


    WH.doHandle = function (json, action) {
        if (json['error']) {
            if (action && action.doHandleError) {
                action.doHandleError(json)
            } else {
                BS.Log.error("Something went wrong: " + json['error']);
                WH.showError(json['error']);
            }
        } else if (json['result']) {
            var res = json['result'];
            if (action) {
                return action.doHandleResult(json, res)
            }
            BS.Log.warn("Unknown action: " + json['action']);
        } else {
            BS.Log.error("Unexpected response: " + JSON.stringify(json))
        }
    };