theonedev/onedev · error · ExplicitException
Subject required to open issue via email
Error message
Subject required to open issue via email
What it means
When a new issue is created by sending an email to a project's issue mail address, the email subject becomes the issue title. OneDev requires a non-blank subject, and throws ExplicitException if it is missing.
Source
Thrown at server-core/src/main/java/io/onedev/server/mail/DefaultMailService.java:758
@Nullable User submitter, ParsedEmailAddress parsedSystemAddress,
Collection<InternetAddress> receiverInternetAddresses) {
String messageId = getMessageId(message);
if (messageId != null) {
var existingIssue = issueService.findByMessageId(messageId);
if (existingIssue != null) {
logger.warn("Ignored opening issue from message as issue with same message id already exists: {}",
existingIssue.getReference());
return existingIssue;
}
}
Issue issue = new Issue();
issue.setProject(project);
try {
var subject = message.getSubject();
if (StringUtils.isBlank(subject)) {
throw new ExplicitException("Subject required to open issue via email");
} else if (subject.trim().toLowerCase().startsWith("re:")) {
throw new ExplicitException("This address is intended to open issues, " +
"however the message looks like a reply to some other email");
}
issue.setTitle(subject);
} catch (MessagingException e) {
throw new RuntimeException(e);
}
if (messageId != null)
issue.setMessageId(messageId);
String description = parseBody(message, project, issue.getUUID());
if (StringUtils.isNotBlank(description))
description = stripSignature(description);
if (StringUtils.isNotBlank(description))
issue.setDescription(decorateContent(description));
View on GitHub (pinned to d44925c47c)
Solutions
- Set a non-blank subject line before sending to the issue email address
- If sending programmatically, set message.setSubject(...) with a non-empty value
- If the mail is not meant to create an issue, send it elsewhere than the issue address
Example fix
// before
MimeMessage m = ...; // no subject set
// after
m.setSubject("Fix login page timeout"); Defensive patterns
Strategy: validation
Validate before calling
if (StringUtils.isBlank(message.getSubject())) throw new IllegalArgumentException("Subject required"); Try / catch
try { issueService.openViaEmail(message); } catch (ExplicitException e) { bounce(e.getMessage()); } Prevention
- Always set a subject when emailing the issue address
- Programmatic sends: assert subject before send
- Educate users that subject = issue title
When it happens
Trigger: Sending an email with an empty or whitespace-only subject line to a project issue-creation email address.
Common situations: Composing a fresh email and leaving subject blank; some mail clients send subject-less mails for quick notes; automated systems generating emails without subjects.
Understand the failure class
Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.
Related errors
- This address is intended to open issues, however the message
- Title is required
- Issue ${issueReference} is not in current project
- Invalid issue id/number
- Not eligible for multi-value
AI-assisted analysis of theonedev/onedev@d44925c47c (2026-09-06).
Data as JSON: /api/errors/9328e8d452dd870b.
Report an issue: GitHub.