MCPcopy
hub / github.com/superplanehq/superplane / HandleHook

Method HandleHook

pkg/registry/trigger.go:91–103  ·  view source on GitHub ↗
(ctx core.TriggerHookContext)

Source from the content-addressed store, hash-verified

89}
90
91func (s *PanicableTrigger) HandleHook(ctx core.TriggerHookContext) (result map[string]any, err error) {
92 defer func() {
93 if r := recover(); r != nil {
94 ctx.Logger.Errorf("Trigger %s panicked in HandleHook(%s): %v\nStack: %s",
95 s.underlying.Name(), ctx.Name, r, debug.Stack())
96 result = nil
97 err = fmt.Errorf("trigger %s panicked in HandleHook(%s): %v",
98 s.underlying.Name(), ctx.Name, r)
99 }
100 }()
101
102 return s.underlying.HandleHook(ctx)
103}
104
105func (s *PanicableTrigger) Cleanup(ctx core.TriggerContext) (err error) {
106 defer func() {

Calls 3

ErrorfMethod · 0.80
NameMethod · 0.65
HandleHookMethod · 0.65