src/codeforces.js
function handleCallback(callback, err, httpResponse, body) {

    if(err){
        return callback(err);
    }

    //
    // API returns error
    //
    if( body.status !== 'OK' ){
        return callback(new Error(body.comment));
    }

    return callback(null, body.result);
}
function handleCallback(callback, err, httpResponse, body) {

    if(err){
        return callback(err);
    }

    //
    // API returns error
    //
    if( body.status !== 'OK' ){
        return callback(new Error(body.comment));
    }

    return callback(null, body.result);
}
function handleCallback ( callback , err , httpResponse , body ) { if ( err ) { return callback ( err ) ; } // // API returns error // if ( body . status !== 'OK' ) { return callback ( new Error ( body . comment ) ) ; } return callback ( null , body . result ) ; }
Handle user callback

@param callback - user callback
@param err - request errors
@param httpResponse - request HTTP response
@param body - request response body
@returns {*}
Handle user callback