src/Tus/Client.php
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);
    }
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);
    }
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 ) ; }
Handle client exception during patch request.

@param ClientException $e

@return mixed
Handle client exception during patch request .