Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Auto Sync Error Logging #128

Merged
merged 10 commits into from
Dec 7, 2023
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