private function getStatusCodeForMediaUploadException(MediaUploadException $e)
    {
        foreach ($this->status_codes as $status_code => $exceptions) {
            if (in_array(get_class($e), $exceptions)) {
                return $status_code;
            }
        }

        return 500;
    }