diff --git a/disqus/rest-api/class-disqus-rest-api.php b/disqus/rest-api/class-disqus-rest-api.php index d050f4d..bda7029 100644 --- a/disqus/rest-api/class-disqus-rest-api.php +++ b/disqus/rest-api/class-disqus-rest-api.php @@ -287,7 +287,8 @@ 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.' ); + error_log($e); + return $this->rest_get_error( 'There was an error fetching sync status. 150 character error message preview: ' . substr($e, 0, 150) ); } } @@ -304,7 +305,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 syncing. 150 character error message preview: ' . substr($e, 0, 150) ); } } @@ -321,7 +322,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 syncing. 150 character error message preview: ' . substr($e, 0, 150) ); } }