Skip to content

Commit

Permalink
Improve Auto Sync Error Logging (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjtang authored Dec 7, 2023
1 parent b34006b commit 4ca310a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions disqus/rest-api/class-disqus-rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ public function rest_sync_status( WP_REST_Request $request ) {

return $this->rest_get_response( $status );
} catch ( Exception $e ) {
return $this->rest_get_error( 'There was an error fetching sync status.' );
return $this->rest_get_error( 'There was an error fetching sync status. Please go to Disqus.com and check that you are logged into a Disqus account with moderator privileges on this site, and then reload this page. For further troubleshooting, here is a 150 character error message preview: ' . substr( $e, 0, 150 ) );
}
}

Expand All @@ -304,7 +304,7 @@ public function rest_sync_enable( WP_REST_Request $request ) {

return $this->rest_get_response( $status );
} catch ( Exception $e ) {
return $this->rest_get_error( 'There was an error attempting to enable syncing.' );
return $this->rest_get_error( 'There was an error attempting to enable automatic syncing. Please go to Disqus.com and check that you are logged into a Disqus account with moderator privileges on this site, and then reload this page. For further troubleshooting, here is a 150 character error message preview: ' . substr( $e, 0, 150 ) );
}
}

Expand All @@ -321,7 +321,7 @@ public function rest_sync_disable( WP_REST_Request $request ) {

return $this->rest_get_response( $status );
} catch ( Exception $e ) {
return $this->rest_get_error( 'There was an error attempting to disable syncing.' );
return $this->rest_get_error( 'There was an error attempting to disable automatic syncing. Please go to Disqus.com and check that you are logged into a Disqus account with moderator privileges on this site, and then reload this page. For further troubleshooting, here is a 150 character error message preview: ' . substr( $e, 0, 150 ) );
}
}

Expand Down

0 comments on commit 4ca310a

Please sign in to comment.