ChangeQueryBuilder: Improve error message when is:mergeable is not supported
The "check configs" part of the message is useless for the majority of users who are unlikely to have access to the server's configuration, so drop that. Reword the message to be more consistent with the ones when the 'is:private' 'is:started' and 'is:wip' operators are not supported. Change-Id: I93ad6ca19134bb7f80e2e263126419ef14484533
This commit is contained in:
@@ -579,7 +579,7 @@ public class ChangeQueryBuilder extends QueryBuilder<ChangeData, ChangeQueryBuil
|
||||
|
||||
if ("mergeable".equalsIgnoreCase(value)) {
|
||||
if (!args.indexMergeable) {
|
||||
throw new QueryParseException("server does not support 'mergeable'. check configs");
|
||||
throw new QueryParseException("'is:mergeable' operator is not supported by server");
|
||||
}
|
||||
return new BooleanPredicate(ChangeField.MERGEABLE);
|
||||
}
|
||||
|
||||
@@ -3093,7 +3093,7 @@ public abstract class AbstractQueryChangesTest extends GerritServerTests {
|
||||
assertThat(thrown.getCause()).isInstanceOf(QueryParseException.class);
|
||||
assertThat(thrown)
|
||||
.hasMessageThat()
|
||||
.contains("server does not support 'mergeable'. check configs");
|
||||
.contains("'is:mergeable' operator is not supported by server");
|
||||
}
|
||||
|
||||
protected ChangeInserter newChange(TestRepository<Repo> repo) throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user