theonedev/onedev · error · ExplicitException

"Criteria '" + ctx.operator.getText() + "' is not supported

Error message

"Criteria '" + ctx.operator.getText() + "' is not supported here"

What it means

Same visitor as the operator rejection: ToBeMergedByMe, ToBeChangedByMe and similar current-user-dependent operators are rejected with this error when the query context was created without current-user criteria (e.g. no authenticated user available).

Source

Thrown at server-core/src/main/java/io/onedev/server/search/entity/pullrequest/PullRequestQuery.java:176

							case Discarded:
								return new DiscardedCriteria();
							case ReadyToMerge:
								return new ReadyToMergeCriteria();
							case NeedMyAction:
								if (!withCurrentUserCriteria)
									throw new ExplicitException("Criteria '" + ctx.operator.getText() + "' is not supported here");
								return new NeedMyActionCriteria();
							case ToBeMergedByMe:
								if (!withCurrentUserCriteria)
									throw new ExplicitException("Criteria '" + ctx.operator.getText() + "' is not supported here");
								return new ToBeMergedByMeCriteria();
							case ToBeChangedByMe:
								if (!withCurrentUserCriteria)
									throw new ExplicitException("Criteria '" + ctx.operator.getText() + "' is not supported here");
								return new ToBeChangedByMeCriteria();
							case MentionedMe:
								if (!withCurrentUserCriteria)
									throw new ExplicitException("Criteria '" + ctx.operator.getText() + "' is not supported here");
								return new MentionedMeCriteria();
							case SubmittedByMe:
								if (!withCurrentUserCriteria)
									throw new ExplicitException("Criteria '" + ctx.operator.getText() + "' is not supported here");
								return new SubmittedByMeCriteria();
							case WatchedByMe:
								if (!withCurrentUserCriteria)
									throw new ExplicitException("Criteria '" + ctx.operator.getText() + "' is not supported here");
								return new WatchedByMeCriteria();
							case IgnoredByMe:
								if (!withCurrentUserCriteria)
									throw new ExplicitException("Criteria '" + ctx.operator.getText() + "' is not supported here");
								return new IgnoredByMeCriteria();
							case CommentedByMe:
								if (!withCurrentUserCriteria)
									throw new ExplicitException("Criteria '" + ctx.operator.getText() + "' is not supported here");
								return new CommentedByMeCriteria();
							case ToBeReviewedByMe:

View on GitHub (pinned to d44925c47c)

Solutions

  1. Avoid user-relative operators (NeedMyAction, ToBeMergedByMe, ToBeChangedByMe) when no current-user context exists.
  2. Authenticate the query or rewrite it with explicit user criteria (e.g. submittedBy me-equivalent by name).
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server-core/src/main/java/io/onedev/server/search/entity/pullrequest/PullRequestQuery.java:176 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of theonedev/onedev@d44925c47c (2026-09-06). Data as JSON: /api/errors/dc3986edd6f50270. Report an issue: GitHub.