MCPcopy Index your code
hub / github.com/simstudioai/sim / formatProviderErrorResponse

Function formatProviderErrorResponse

apps/sim/lib/webhooks/processor.ts:210–217  ·  view source on GitHub ↗
(
  webhookRecord: { provider: string },
  error: string,
  status: number
)

Source from the content-addressed store, hash-verified

208 * Delegates to the provider handler registry.
209 */
210export function formatProviderErrorResponse(
211 webhookRecord: { provider: string },
212 error: string,
213 status: number
214): NextResponse {
215 const handler = getProviderHandler(webhookRecord.provider)
216 return handler.formatErrorResponse?.(error, status) ?? NextResponse.json({ error }, { status })
217}
218
219/**
220 * Check if a webhook event should be skipped based on provider-specific filtering.

Callers 1

Calls 2

getProviderHandlerFunction · 0.90
formatErrorResponseMethod · 0.80

Tested by

no test coverage detected