protected function handleClientException(ClientException $e)
    {
        $statusCode = $e->getResponse()->getStatusCode();

        if (HttpResponse::HTTP_REQUESTED_RANGE_NOT_SATISFIABLE === $statusCode) {
            return new FileException('The uploaded file is corrupt.');
        }

        if (HttpResponse::HTTP_CONTINUE === $statusCode) {
            return new ConnectionException('Connection aborted by user.');
        }

        if (HttpResponse::HTTP_UNSUPPORTED_MEDIA_TYPE === $statusCode) {
            return new TusException('Unsupported media types.');
        }

        return new TusException($e->getResponse()->getBody(), $statusCode);
    }