fix: add nil guard to Route.start

This commit is contained in:
yusing
2026-02-06 12:19:11 +08:00
parent cd94479030
commit ad59ddb9d8

View File

@@ -521,6 +521,9 @@ func (r *Route) start(parent task.Parent) gperr.Error {
}
} else {
ep := entrypoint.FromCtx(parent.Context())
if ep == nil {
return gperr.New("entrypoint not initialized")
}
r.task = parent.Subtask("excluded."+r.Name(), false)
ep.ExcludedRoutes().Add(r.impl)