src/Laravel/LaravelNorthstar.php
public function send($method, $path, $options = [], $withAuthorization = true)
    {
        try {
            return parent::send($method, $path, $options, $withAuthorization);
        } catch (ValidationException $e) {
            throw LaravelValidationException::withMessages($e->getErrors());
        } catch (UnauthorizedException $e) {
            throw new \Illuminate\Auth\AuthenticationException;
        } catch (ForbiddenException $e) {
            throw new \Illuminate\Auth\AuthenticationException;
        } catch (InternalException $e) {
            $message = 'Northstar returned an unexpected error for that request.';

            if (config('app.debug')) {
                $message = $e->getMessage();
            }

            throw new HttpException(500, $message);
        }
    }
public function send($method, $path, $options = [], $withAuthorization = true)
    {
        try {
            return parent::send($method, $path, $options, $withAuthorization);
        } catch (ValidationException $e) {
            throw LaravelValidationException::withMessages($e->getErrors());
        } catch (UnauthorizedException $e) {
            throw new \Illuminate\Auth\AuthenticationException;
        } catch (ForbiddenException $e) {
            throw new \Illuminate\Auth\AuthenticationException;
        } catch (InternalException $e) {
            $message = 'Northstar returned an unexpected error for that request.';

            if (config('app.debug')) {
                $message = $e->getMessage();
            }

            throw new HttpException(500, $message);
        }
    }
public function send ( $ method , $ path , $ options = [ ] , $ withAuthorization = true ) { try { return parent :: send ( $ method , $ path , $ options , $ withAuthorization ) ; } catch ( ValidationException $ e ) { throw LaravelValidationException :: withMessages ( $ e -> getErrors ( ) ) ; } catch ( UnauthorizedException $ e ) { throw new \ Illuminate \ Auth \ AuthenticationException ; } catch ( ForbiddenException $ e ) { throw new \ Illuminate \ Auth \ AuthenticationException ; } catch ( InternalException $ e ) { $ message = 'Northstar returned an unexpected error for that request.' ; if ( config ( 'app.debug' ) ) { $ message = $ e -> getMessage ( ) ; } throw new HttpException ( 500 , $ message ) ; } }
Send a Northstar API request, and translates any Northstar exceptions
into their built-in Laravel equivalents.

@param string $method
@param string $path
@param array $options
@param bool $withAuthorization
@return \GuzzleHttp\Psr7\Response|void
Send a Northstar API request and translates any Northstar exceptions into their built - in Laravel equivalents .