(
webhookRecord: { provider: string },
error: string,
status: number
)
| 208 | * Delegates to the provider handler registry. |
| 209 | */ |
| 210 | export 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. |
no test coverage detected