File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -208,6 +208,11 @@ File.prototype.copy = function(destination, callback) {
208208 * piped to a writable stream or listened to for 'data' events to read a file's
209209 * contents.
210210 *
211+ * In the unlikely event there is a mismatch between what you downloaded and the
212+ * version in your Bucket, your error handler will receive an error with code
213+ * 911. If you receive this error, the best recourse is to try downloading the
214+ * file again.
215+ *
211216 * @example
212217 * //-
213218 * // <h4>Downloading a File</h4>
@@ -274,11 +279,14 @@ File.prototype.createReadStream = function() {
274279 if ( that . metadata . md5Hash === localMd5Hash ) {
275280 throughStream . emit ( 'complete' ) ;
276281 } else {
277- var error = new Error ( [
278- 'The downloaded data did not match the data from the server. ' ,
279- 'To be sure the content is the same, you should download the ' ,
280- 'file again.'
281- ] . join ( '' ) ) ;
282+ var error = new Error ( {
283+ code : 911 ,
284+ message : [
285+ 'The downloaded data did not match the data from the server.' ,
286+ 'To be sure the content is the same, you should download the' ,
287+ 'file again.'
288+ ] . join ( ' ' )
289+ } ) ;
282290
283291 throughStream . emit ( 'error' , error ) ;
284292 }
You can’t perform that action at this time.
0 commit comments