Follow-up implementation for #6674.
Proposed Changes
- replace panic paths in loader with proper error returns:
- missing dialers by execution id
- nil waitgroup in template loading path
- update function signatures to propagate errors:
Store.Load
Store.LoadTemplates
Store.LoadTemplatesWithTags
- update all affected callers to handle and propagate returned errors:
- runner, lazy auth path, sdk/multi-sdk, integration test entry, server sdk, automaticscan
- include regression test for missing dialers error path
- include benchmark/test call-site updates for new return signatures
- include nitpick cleanup from review pass:
- avoid redundant
Wrapf(..., "%s", err) wrapping in SDK entry points
- use
require.ErrorContains in loader tests
Proof
# compile-check for touched integration/sdks paths
go test ./lib ./internal/server ./cmd/integration-test -run TestNonExistent -count=1
# behavioral/unit checks for modified runtime paths
go test ./pkg/catalog/loader ./pkg/protocols/common/automaticscan ./internal/runner -count=1
Checklist
- PR created against
dev
- Tests/compile checks provided for touched paths
- Regression assertion added for dialer-missing error behavior
/claim #6674
Summary by CodeRabbit
-
Bug Fixes
- Template-loading failures now surface clear, propagated errors; missing or duplicate templates are detected and reported.
- Missing connectors/dialers now produce explicit errors instead of silent failures.
-
Refactor
- Template-loading APIs and execution paths updated to return and propagate load errors so callers halt or handle failures gracefully.
- Error messages standardized and simplified for clearer reporting.
-
Tests
- Added a test verifying error reporting when required dialers/connectors are missing.