Skip to content

Wiki: refactor to reduce nested #capture_git_error calls

Related to: !156411 (comment 1956434870)

As far as I could see in the code base, I still think that we can make the #capture_git_error private, as it being used outside of the WikiPage seems like a leak of internals IMHO. This should be quite straightforward because:

  • Currently, WikiPages::CreateService calls page.create from within a capture_git_error, but the page.create already uses the capture_git_error internally, so I don't see a reason why we're using it twice.
  • Same thing happens on WikiPages::UpdateService, it's calling page.update from within a capture_git_error, but the page.update already calls the capture_git_error internally, therefore I think we can remove the external call as well.