diff --git a/.github/workflows/contract-check.yml b/.github/workflows/contract-check.yml index 47d394da..bc38e3c1 100644 --- a/.github/workflows/contract-check.yml +++ b/.github/workflows/contract-check.yml @@ -178,7 +178,7 @@ jobs: - name: Comment PR with contract changes if: steps.contract-diff.outputs.has_changes == 'true' - uses: actions/github-script@v8 + uses: actions/github-script@v9 with: script: | const fs = require('fs'); diff --git a/application.go b/application.go index 6b084486..66f2bca4 100644 --- a/application.go +++ b/application.go @@ -739,7 +739,7 @@ func (app *StdApplication) InitWithApp(appToPass Application) error { defer func() { if r := recover(); r != nil { mu.Lock() - errs = append(errs, fmt.Errorf("panic initializing module %s: %v", name, r)) + errs = append(errs, fmt.Errorf("%w %s: %v", ErrModuleInitializationPanic, name, r)) mu.Unlock() } }() diff --git a/errors.go b/errors.go index 0b2c2528..2d9fe570 100644 --- a/errors.go +++ b/errors.go @@ -87,12 +87,13 @@ var ( ErrTenantIsolationViolation = errors.New("tenant isolation violation") // Reload errors - ErrReloadCircuitBreakerOpen = errors.New("reload circuit breaker is open; backing off") - ErrReloadChannelFull = errors.New("reload request channel is full") - ErrReloadInProgress = errors.New("reload already in progress") - ErrReloadStopped = errors.New("reload orchestrator is stopped") - ErrReloadTimeout = errors.New("reload timed out waiting for module") - ErrDynamicReloadNotEnabled = errors.New("dynamic reload not enabled") + ErrReloadCircuitBreakerOpen = errors.New("reload circuit breaker is open; backing off") + ErrReloadChannelFull = errors.New("reload request channel is full") + ErrReloadInProgress = errors.New("reload already in progress") + ErrReloadStopped = errors.New("reload orchestrator is stopped") + ErrReloadTimeout = errors.New("reload timed out waiting for module") + ErrDynamicReloadNotEnabled = errors.New("dynamic reload not enabled") + ErrModuleInitializationPanic = errors.New("panic initializing module") // Observer/Event emission errors ErrNoSubjectForEventEmission = errors.New("no subject available for event emission")