Skip to content

campaigns: suggest alternatives when campaigns are unlicensed

Warren Gifford requested to merge aharvey/improve-licensing-error-output into main

Created by: LawnGnome

In and around sourcegraph/sourcegraph#16687, we had a fairly lengthy discussion around how to present licensing errors to the user. Doing it in a way that is actionable for the user is fairly tricky: we don't have a simple limit directive that could be applied to the repository search, so the user is left with a campaign spec that they might still want to trial but don't know how to get to a trialable state.

This PR uses the new error code returned from sourcegraph/sourcegraph#16687 to special case licensing errors. When those are detected, a suggestion is made for how the campaign spec could be modified to be compliant with the unlicensed behaviour.

Here's how it looks:

image

Linked to sourcegraph/sourcegraph#15715, but it's more a bonus adventure than that issue.

Merge request reports

Loading