Move error handling in to imagecache

Allow the error to propagate to the cache layer, where we can decide what do with it.