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

Method OnIntegrationMessage

pkg/registry/trigger.go:119–135  ·  view source on GitHub ↗
(ctx core.IntegrationMessageContext)

Source from the content-addressed store, hash-verified

117}
118
119func (s *PanicableTrigger) OnIntegrationMessage(ctx core.IntegrationMessageContext) (err error) {
120 defer func() {
121 if r := recover(); r != nil {
122 ctx.Logger.Errorf("Trigger %s panicked in OnIntegrationMessage(): %v\nStack: %s",
123 s.underlying.Name(), r, debug.Stack())
124 err = fmt.Errorf("trigger %s panicked in OnIntegrationMessage(): %v",
125 s.underlying.Name(), r)
126 }
127 }()
128
129 integrationTrigger, ok := s.underlying.(core.IntegrationTrigger)
130 if !ok {
131 return fmt.Errorf("trigger %s is not an integration trigger", s.underlying.Name())
132 }
133
134 return integrationTrigger.OnIntegrationMessage(ctx)
135}

Callers

nothing calls this directly

Calls 3

ErrorfMethod · 0.80
NameMethod · 0.65
OnIntegrationMessageMethod · 0.65

Tested by

no test coverage detected