This PR replaces panic() calls with proper error returns in the template loader when dialers are not initialized or wait group creation fails.
The template loader in pkg/catalog/loader/loader.go currently panics when protocolstate.GetDialersWithId() returns nil or when wait group creation fails. This is too harsh for a public API that may be exercised in non-scanning flows.
Replace panic with proper error propagation:
LoadTemplatesWithTags now returns ([]*templates.Template, error)LoadTemplates now returns ([]*templates.Template, error)Load() now returns errorUpdated all callers to handle the new error returns:
internal/runner/runner.gointernal/runner/lazy.gointernal/server/nuclei_sdk.golib/sdk.golib/multi.gocmd/integration-test/library.gopkg/protocols/common/automaticscan/util.go/claim #6674
Fixes #6674
Simplereally
@Simplereally
ProjectDiscovery
@projectdiscovery
Madhavan Deepak
@Madhavan-Deepak