taskcluster / cloud-mirror

cloud mirror
Mozilla Public License 2.0
0 stars 7 forks source link

Leave inputStream errors for storageProvider #29

Closed jonasfj closed 8 years ago

jonasfj commented 8 years ago

It's important that inputStream.on('error', is handling in storageProvider.put.

  1. If it's not handled there and storageProvider.put throw throw an error because it, we could be inserting a cache entry with "present".
  2. By not handling it here, we ensure that the app will crash if storageProvider.put doesn't handle it!

Note: I fully support converting inputStream events like abort and aborted to error events. Simplifying the contract because CacheManager and StorageProvider.

jhford commented 8 years ago
commit 5f51eb53b91305bf2050f1a09a2cdbb3e30cc6d2
Author: Jonas Finnemann Jensen <jopsen@gmail.com>
Date:   Wed Nov 2 10:45:03 2016 -0700

    Leave inputStream errors for storageProvider

    It's important that `inputStream.on('error',` is handling in `storageProvider.put`.
      1. If it's not handled there and `storageProvider.put` throw throw an error because it, we could be inserting a cache entry with "present".
      2. By not handling it here, we ensure that the app will crash if `storageProvider.put` doesn't handle it!

    Note: I fully support converting `inputStream` events like `abort` and `aborted` to `error` events. Simplifying the contract because `CacheManager` and `StorageProvider`.