quarkusio/quarkus · error · IllegalArgumentException
No end to link
Error message
No end to link
What it means
Inside LinkDelegate parsing, parseLink extracts the target URI between '<' and '>'. If no closing '>' exists anywhere after the current position (indexOf returns -1), the header string is truncated or malformed, so it throws IllegalArgumentException("No end to link").
Source
Thrown at independent-projects/resteasy-reactive/common/runtime/src/main/java/org/jboss/resteasy/reactive/common/headers/LinkDelegate.java:81
for (String val : values)
builder.title(val);
} else if (name.equals("type")) {
for (String val : values)
builder.type(val);
} else {
for (String val : values)
builder.param(name, val);
}
}
}
public String parseLink() {
int end = value.indexOf('>', curr);
if (end == -1)
throw new IllegalArgumentException("No end to link");
String href = value.substring(curr + 1, end);
curr = end + 1;
return href;
}
public void parseAttribute(MultivaluedMap<String, String> attributes) {
int end = value.indexOf('=', curr);
if (end == -1 || end + 1 >= value.length())
throw new IllegalArgumentException("No end to parameter");
String name = value.substring(curr, end);
name = name.trim();
curr = end + 1;
String val = null;
if (curr >= value.length()) {
val = "";
} else {
if (value.charAt(curr) == '"') {View on GitHub (pinned to e1c734241f)
Solutions
- Fix the header string so the target URI is enclosed: '<uri>; rel="..."'
- Validate the presence of '<' and '>' before calling parse
- Check the origin of the truncated value (proxy, log reassembly, manual concatenation)
- Catch IllegalArgumentException and log the raw value for diagnosis
Example fix
// before
Link link = LinkDelegate.INSTANCE.fromString("</page/2; rel=\"next\""); // missing '>'
// after
Link link = LinkDelegate.INSTANCE.fromString("</page/2>; rel=\"next\""); Defensive patterns
Strategy: validation
Validate before calling
int open = value.indexOf('<'); int close = value.indexOf('>');
if (open == -1 || close == -1 || close < open) { throw new IllegalArgumentException("Malformed Link header (missing '>'): " + value); } Try / catch
try {
Link link = LinkDelegate.INSTANCE.fromString(value);
} catch (IllegalArgumentException e) {
if (e.getMessage().equals("No end to link")) {
// log raw value; header was truncated or malformed
}
} Prevention
- Verify '<uri>' pairing in Link header strings before parsing
- Check for truncation when headers pass through proxies/log tooling
- Add unit tests for Link header construction to catch missing brackets
When it happens
Trigger: Parsing a Link header value with an unterminated target, e.g. '</page/2; rel="next"' (missing '>'), passed to LinkDelegate.parse/fromString.
Common situations: Truncated headers from proxies/log processing; hand-written header strings missing the closing angle bracket; copy-paste errors when constructing Link headers in tests.
Related errors
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/482767058871fa50.
Report an issue: GitHub.