protected function handleS3PromisesResult($s3_results)
    {
        foreach ($s3_results as $promise) {
            if ($promise['state'] !== 'fulfilled') {
                $code = HttpStatusCodes::HTTP_SERVICE_UNAVAILABLE;
                if (array_key_exists('value', $promise)) {
                    $response = $promise['value'];
                    $code = $response->getStatusCode();
                }
                throw new FilestackException("Errored uploading to s3", $code);
            }
        }
    }