node crypto decipher stream throws EVP_DecryptFinal_ex:wrong final block length if stream will be interrupted

I have a node.js client which downloads and decrypts an AES encrypted file from another host.

var base64 = require('base64-stream');
var crypto = require('crypto');
var aes = crypto.createDecipher('aes-256-cbc', crypto.createHash('sha256').update(pass).digest('hex'));

// file stream
var file = fs.createWriteStream(params.target);
var base64reader = base64.decode();
response.pipe(base64reader)  // decode base64
        .pipe(aes)              // decrypt
        .pipe(file);            // write in file

// on last data chunk received: file load complete
aes.on('end', function (chunk) {
    if (typeof params.success !== 'undefined')
        params.success();
});

If the other host close his connection unexpectedly before finishing the request, the code above throws this error:

TypeError: error:0606506D:digital envelope routines:EVP_DecryptFinal_ex:wrong final block length
    at Decipher.Cipher._flush (crypto.js:262:27)
    at Decipher.eval (_stream_transform.js:130:12)
    at Decipher.g (events.js:187:16)
    at Decipher.EventEmitter.emit (events.js:95:17)
    at prefinish (_stream_writable.js:427:12)
    at finishMaybe (_stream_writable.js:435:7)
    at afterWrite (_stream_writable.js:317:3)
    at onwrite (_stream_writable.js:307:7)
    at WritableState.onwrite (_stream_writable.js:100:5)
    at afterTransform (_stream_transform.js:99:5)
    at TransformState.afterTransform (_stream_transform.js:74:12)
    at Decipher.Cipher._transform (crypto.js:258:3)
    at Decipher.Transform._read (_stream_transform.js:179:10)
    at Decipher.Readable.read (_stream_readable.js:334:10)
    at flow (_stream_readable.js:743:26)
    at WriteStream.eval (_stream_readable.js:601:7)

I tried to add an aes.on('error', function(() {...}); handler but it will not be called. I also tried adding

response.on('end', function() { aes.emit('close'); });
response.on('close', function() { aes.emit('close'); });

but then aes.on('end', ...); will not be called. Adding aes.emit('end') to this statements make no sense, because this will be also called in case of an error which leads to the error above.

response.on('end', function() { aes.emit('end'); aes.emit('close'); });
response.on('close', function() { aes.emit('end'); aes.emit('close'); });

Does anybody have an idea how I can catch this error?

Thanks a lot!!

Its a bug in node.js v0.11.9 which is solved in v0.11.13. Then aes.on('error', ...) will be called correctly.