package connector_inbound_routing

import "errors"

// ErrRouteNotDeclared is returned by RouteResolver when no live route row
// exists for the requested (namespace, eventKind) or
// (installedPackID, eventKind, version).
//
// Callers should treat this as a "not found" sentinel.
//
// The message string is preserved verbatim from the original connector_inbound
// package for log continuity.
var ErrRouteNotDeclared = errors.New("connector_inbound: route not declared")

// ErrRouteVersionSwept is returned by RouteResolver.ResolveFlowByVersion when
// the route row for the requested Version exists but has been soft-deleted
// (IsDeleted=1).
//
// TODO(NCRM-INT-11c): the version-level GC sweeper that sets IsDeleted=1 on
// old-version rows is deferred to a follow-up PR.  Until that sweeper lands,
// no live code path will soft-delete a specific-version row, so this sentinel
// is plumbed but dormant.  Worker code should still handle it correctly when
// the sweeper is implemented: if a Worker encounters ErrRouteVersionSwept it
// means the sweeper ran while a queue row still held a reference (a concurrency
// invariant violation) and the event should be failed-terminal for human review.
var ErrRouteVersionSwept = errors.New("connector_inbound: route version was swept before processing")
