vendor/djchen/oauth2-fitbit/src/Provider/Fitbit.php
/**
     * Checks Fitbit API response for errors.
     *
     * @throws IdentityProviderException
     * @param  ResponseInterface $response
     * @param  array|string $data Parsed response data
     * @return void
     */
Checks Fitbit API response for errors.
@throws IdentityProviderException
@param  ResponseInterface $response
@param  array|string $data Parsed response data
@return void
Checks Fitbit API response for errors . @throws IdentityProviderException @param ResponseInterface $response @param array|string $data Parsed response data @return void
protected function checkResponse(ResponseInterface $response, $data)
    {
        if (!empty($data['errors'][0])) {
            $message = $data['errors'][0]['errorType'] . ': ' . $data['errors'][0]['message'];
            throw new IdentityProviderException($message, $response->getStatusCode(), $data);
        }
    }
protected function checkResponse ( ResponseInterface $ response , $ data ) { if ( ! empty ( $ data [ 'errors' ] [ 0 ] ) ) { $ message = $ data [ 'errors' ] [ 0 ] [ 'errorType' ] . ': ' . $ data [ 'errors' ] [ 0 ] [ 'message' ] ; throw new IdentityProviderException ( $ message , $ response -> getStatusCode ( ) , $ data ) ; } }
Checks Fitbit API response for errors.
Checks Fitbit API response for errors .