alibaba/nacos · error · IllegalArgumentException
Endpoint must not be null
Error message
Endpoint must not be null
What it means
Error "Endpoint must not be null" thrown in alibaba/nacos.
Source
Thrown at api/src/main/java/com/alibaba/nacos/api/ai/utils/EndpointCanonicalizer.java:60
private static final int MAX_PORT = 65535;
private static final int DEFAULT_PRIORITY = 0;
private static final double DEFAULT_WEIGHT = 1D;
private EndpointCanonicalizer() {
}
/**
* Return a canonical copy of an Endpoint. Defaults are materialized and metadata keys are sorted.
*
* @param endpoint source Endpoint
* @return canonical Endpoint copy
* @throws IllegalArgumentException when the Endpoint is invalid
*/
public static Endpoint canonicalize(Endpoint endpoint) {
if (endpoint == null) {
throw new IllegalArgumentException("Endpoint must not be null");
}
CanonicalEndpointUri canonicalUri = parseUri(endpoint.getUri());
AgentValidationUtils.validateTransport(endpoint.getTransport());
Integer priority = endpoint.getPriority();
if (priority == null) {
priority = DEFAULT_PRIORITY;
} else if (priority < 0) {
throw new IllegalArgumentException("Endpoint priority must not be negative");
}
Double weight = endpoint.getWeight();
if (weight == null) {
weight = DEFAULT_WEIGHT;
} else if (weight.isNaN() || weight.isInfinite() || weight < 0D || weight > 10000D) {
throw new IllegalArgumentException("Endpoint weight must be between 0 and 10000");
}
AgentValidationUtils.validateEndpointMetadata(endpoint.getMetadata());
View on GitHub (pinned to 9b989acdf1)
Solutions
- Provide a non-null value for endpoint null before invoking this operation.
When it happens
Trigger: Thrown at api/src/main/java/com/alibaba/nacos/api/ai/utils/EndpointCanonicalizer.java:60 when the library encounters an invalid state.
Common situations: Canonicalizing a null Endpoint object.
AI-assisted analysis of alibaba/nacos@9b989acdf1 (2026-08-14).
Data as JSON: /api/errors/c541397ce5fd71ed.
Report an issue: GitHub.