Closed xciser77 closed 5 years ago
found it out, you should catch the LoginException and not the ErrorResponse Exception $ocip = new OcipClient('tls://broadsoft.link', 'bsusername', 'bspassword'); try { $loginData = $ocip->login(); } catch (LoginException $e) { $errorMessage = $e->getMessage() . PHP_EOL; flash($errorMessage)->error(); return redirect()->back(); exit(); }
I am developing with Laravel and trying to catch login errors.
But when I fill in a wrong username or password I get an interl server error 500. When I enable debug. It shows me CWM \ BroadWorksConnector \ Ocip \ LoginException [Error 5401] User is not found on Network Server.
Anyone knows how to catch the login errors with a nice result ?