File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -233,17 +233,18 @@ public function handle(ServerRequestInterface $request): ResponseInterface
233233 'email ' => $ user_data_from_provider ->email (),
234234 ]));
235235
236- } catch (IdentityProviderException $ e ) {
236+ } catch (Exception $ e ) {
237237
238238 // Failed to get the access token or user details.
239- CustomModuleLog::addDebugLog ($ log_module , 'Failed to get the access token or user details ' . ': ' . $ e ->getMessage ());
239+ $ error_message = $ e ->getMessage () . ' ' . $ e ->getFile () . ' ' . $ e ->getLine ();
240+ CustomModuleLog::addDebugLog ($ log_module , 'Failed to get the access token or user details ' . ': ' . $ error_message );
240241
241242 return $ this ->viewResponse (OAuth2Client::viewsNamespace () . '::alert ' , [
242243 'title ' => I18N ::translate ('OAuth 2.0 communication error ' ),
243244 'tree ' => $ tree instanceof Tree ? $ tree : null ,
244245 'alert_type ' => OAuth2Client::ALERT_DANGER ,
245246 'module_name ' => $ oauth2_client ->title (),
246- 'text ' => I18N ::translate ('Failed to get the access token or the user details from the authorization provider ' ) . ': ' . $ e -> getMessage () ,
247+ 'text ' => I18N ::translate ('Failed to get the access token or the user details from the authorization provider ' ) . ': ' . $ error_message ,
247248 ]);
248249 }
249250 }
You can’t perform that action at this time.
0 commit comments