lib/registry-client-v2.js
function registryError(err, res, callback) {
    var body = '';
    res.on('data', function onResChunk(chunk) {
        body += chunk;
    });
    res.on('end', function onResEnd() {
        // Parse errors in the response body.
        var message = _getRegistryErrMessage(body);
        if (message) {
            err.message = message;
        }
        callback(err);
    });
}
function registryError(err, res, callback) {
    var body = '';
    res.on('data', function onResChunk(chunk) {
        body += chunk;
    });
    res.on('end', function onResEnd() {
        // Parse errors in the response body.
        var message = _getRegistryErrMessage(body);
        if (message) {
            err.message = message;
        }
        callback(err);
    });
}
function registryError ( err , res , callback ) { var body = '' ; res . on ( 'data' , function onResChunk ( chunk ) { body += chunk ; } ) ; res . on ( 'end' , function onResEnd ( ) { // Parse errors in the response body. var message = _getRegistryErrMessage ( body ) ; if ( message ) { err . message = message ; } callback ( err ) ; } ) ; }
The Docker Registry will usually provide a more detailed JSON error message in the response body, so try to read that data in order to get a more detailed error msg.
The Docker Registry will usually provide a more detailed JSON error message in the response body so try to read that data in order to get a more detailed error msg .