Confluence comment errors on restricted pages block approval creation, surface as unclear errors, and reply threading is unreliable

Description

Impact

The bug affects users creating or processing approvals on restricted Confluence pages. Users encounter unclear internal errors, and approval creation fails when notifications can't be added.

Expected behaviour

  • Approvals should still be created/updated even if comment notifications fail.

  • Errors should be logged as NOTIFICATION / WARN with relevant details.

  • Correct HTTP status codes should be returned instead of a generic 500 Internal Server Error.

  • Replies should correctly append to existing approval threads or create new threads if the original comment is deleted.

Actual behaviour

Users see a generic internal error in the UI when a comment notification fails. The approval is not persisted, and logs show an ERROR entry with a full stack trace.

Steps to reproduce

  • Create or process an approval on a restricted Confluence page.

  • Trigger a failure in adding a notification comment or accessing page properties.

  • Observe the error message and logs generated.

Other information

  • Replies to existing approval threads can become new top-level comments if the link to the original comment is lost.

  • Notifications to multiple users (reassigned notifications) have been optimized to mention all users in a single comment.