Provide a useful error when failing to perform post-commit with GitLab.

Review Request #11053 — Created June 23, 2020 and submitted

chipx86
Review Board
release-3.0.x
reviewboard

GitLab doesn't have a suitable API for accessing diff contents, so our
only option is to access a non-API URL for fetching diff contents. While
this used to work with private repositories via a Personal Access Token,
it hasn't worked for about a year now, as they've removed that
functionality from all public URLs to address a security issue.

This does still work on older versions or for public repositories,
though, so we want to keep the capability around. To do this, we're now
explicitly checking for a HTTP 404, and if we find it, we provide a
useful blurb of text explaining the situation and linking to a KB
article for more details.

As part of this, review request creation and updating now handles
HostingServiceError responses gracefully.

Unit tests pass.

Manually tested this error condition and saw a useful error message.

Manually tested against a public repository and saw the commit go
through.

Summary
Provide a useful error when failing to perform post-commit with GitLab.
chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (a1889f9)
Loading...