src/Model/Integration.php
public static function listValidationErrors(BadResponseException $exception)
    {
        $response = $exception->getResponse();
        if ($response && $response->getStatusCode() === 400) {
            $response->getBody()->seek(0);
            $data = $response->json();
            if (isset($data['detail']) && is_array($data['detail'])) {
                return $data['detail'];
            }
        }

        throw $exception;
    }
public static function listValidationErrors(BadResponseException $exception)
    {
        $response = $exception->getResponse();
        if ($response && $response->getStatusCode() === 400) {
            $response->getBody()->seek(0);
            $data = $response->json();
            if (isset($data['detail']) && is_array($data['detail'])) {
                return $data['detail'];
            }
        }

        throw $exception;
    }
public static function listValidationErrors ( BadResponseException $ exception ) { $ response = $ exception -> getResponse ( ) ; if ( $ response && $ response -> getStatusCode ( ) === 400 ) { $ response -> getBody ( ) -> seek ( 0 ) ; $ data = $ response -> json ( ) ; if ( isset ( $ data [ 'detail' ] ) && is_array ( $ data [ 'detail' ] ) ) { return $ data [ 'detail' ] ; } } throw $ exception ; }
Process an API exception to list integration validation errors.

@param \GuzzleHttp\Exception\BadResponseException $exception
An exception received during integration create, update, or validate.

@see \Platformsh\Client\Model\Integration::validate()

@throws \GuzzleHttp\Exception\BadResponseException
The original exception is re-thrown if specific validation errors
cannot be found.

@return string[] A list of errors.
Process an API exception to list integration validation errors .