mirror of
https://github.com/10h30/wp-strava.git
synced 2026-07-17 05:33:44 +09:00
Added exception handling to authorization process
This commit is contained in:
@@ -118,7 +118,11 @@ abstract class WPStrava_Auth {
|
||||
|
||||
$data = $this->add_initial_params( $data );
|
||||
|
||||
$strava_info = $this->token_request( $data );
|
||||
try {
|
||||
$strava_info = $this->token_request( $data );
|
||||
} catch ( WPStrava_Exception $e ) {
|
||||
wp_die( $e->to_html() ); // phpcs:ignore -- Debug only.
|
||||
}
|
||||
|
||||
if ( isset( $strava_info->access_token ) ) {
|
||||
$settings->add_id( $client_id );
|
||||
|
||||
Reference in New Issue
Block a user