| | |
| | | } catch (Exception $e) { |
| | | global $wpdb; |
| | | $wpdb->query('ROLLBACK'); |
| | | $this->logError('markContentNotificationRead exception', [ |
| | | $this->logError($e->getMessage(),'markContentNotificationRead', [ |
| | | 'seen_id' => $seen_id, |
| | | 'user_id' => $user_id, |
| | | 'error' => $e->getMessage() |
| | | ]); |
| | | return [ |
| | | 'success' => false, |
| | |
| | | ]); |
| | | } catch (Exception $e) { |
| | | // Don't fail the request if metrics tracking fails |
| | | $this->logError('trackMetrics failed', [ |
| | | 'error' => $e->getMessage(), |
| | | $this->logError($e->getMessage(),'trackMetrics', [ |
| | | 'user_id' => $user_id, |
| | | 'action' => $action |
| | | ]); |