feat: configurable webhook delivery timeout + fix merge artifacts - #898
Merged
Abd-Standard merged 1 commit intoOct 2, 2026
Conversation
…EOUT_MS) - Add webhookTimeoutMs field to RetrySchedulerOptions and RetrySchedulerConfig - Read WEBHOOK_DELIVERY_TIMEOUT_MS env var in loadRetrySchedulerConfig() (default 10 000 ms) - Pass timeout to WebhookDeliveryService constructor in RetryScheduler - Document new env var in .env.example Fix pre-existing merge artifacts: - request-id.ts: restore missing closing brace on generateCorrelationId() - security-headers.ts: fix invalid 'http.ServerResponse' import type syntax - discord-notification.ts: remove dead unreachable return in scvString case; restore missing closing brace on sanitizeForDiscord() - index.ts: collapse duplicate healthMonitor construction, remove duplicate subscriber declaration, fix broken shutdown try/catch block - events-server.ts: remove duplicate TemplateService/handleTemplateRoutes imports; add missing handleApiError and applyRequestIdMiddleware imports - config.ts: remove duplicate types import line; add missing validateSecrets import - event-subscriber.ts: remove duplicate processableEvents declaration; collapse duplicate getContractEvents request block; add missing backfillStartLedger property
|
@Vvictor-commits Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #837
Summary
Adds administrator-configurable timeout for outbound webhook delivery requests, and fixes several merge artifacts that were causing TypeScript syntax and compilation errors.
Feature:
WEBHOOK_DELIVERY_TIMEOUT_MSAdmins can now control how long the retry scheduler waits for a webhook endpoint to respond before treating the request as a failure.
Files changed:
listener/src/types/index.ts— addedwebhookTimeoutMs: numbertoRetrySchedulerOptionslistener/src/services/retry-scheduler.ts— added field toRetrySchedulerConfig/RETRY_SCHEDULER_DEFAULTS; constructor passes it toWebhookDeliveryServicelistener/src/config.ts— readsWEBHOOK_DELIVERY_TIMEOUT_MSinloadRetrySchedulerConfig()listener/.env.example— documents the new variableTimed-out requests surface as
AbortErrorinsideWebhookDeliveryService, which already returnssuccess: falseand triggers normal retry backoff — no changes needed there.Bug fixes (pre-existing merge artifacts)
utils/request-id.ts}ongenerateCorrelationId()— body ran into next JSDoc blockmiddleware/security-headers.tsimport type { http.ServerResponse }syntax; function signature usedhttp.ServerResponseservices/discord-notification.ts}onsanitizeForDiscord(); dead unreachablereturninscvStringcaseindex.tshealthMonitorconstruction with orphaned lines; duplicatesubscriberdeclaration; broken shutdowntryblockapi/events-server.tsTemplateService/handleTemplateRoutesimports; missinghandleApiError+applyRequestIdMiddlewareimportsconfig.tsvalidateSecretsimportservices/event-subscriber.tsprocessableEventsdeclaration; duplicategetContractEventsrequest block; missingbackfillStartLedgerclass propertyTesting
WEBHOOK_DELIVERY_TIMEOUT_MSflows from env →RetrySchedulerOptions→WebhookDeliveryService({ timeoutMs })AbortErrorby the existing handler and returned assuccess: false, consumed byRetryScheduler.processRetry()as a retryable failureWebhookDeliveryServiceandretry-scheduler-webhook.test.tstests remain valid (they pass an explicit mock, bypassing the constructor default)