• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

safe-global / safe-events-service / 24831904352
87%

Build:
DEFAULT BRANCH: main
Ran 23 Apr 2026 11:10AM UTC
Jobs 2
Files 46
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

23 Apr 2026 11:09AM UTC coverage: 86.578% (-0.2%) from 86.785%
24831904352

push

github

web-flow
feat: migrate webhook HTTP client from axios to undici with retry (#492)

Closes [PLA-1252](https://linear.app/safe-global/issue/PLA-1252/optimize-webhook-http-delivery)
Closes #116

## Summary

- Replace `@nestjs/axios` / `HttpService` with a `RetryAgent(new Agent(...))` provider injected under `UNDICI_AGENT` in `WebhookModule`
- Rewrite `postWebhook` as plain `async/await`, removing the RxJS `firstValueFrom` / `catchError` / `of` layer
- Add exponential-backoff retry on transient network errors and 5xx responses (`maxRetries: 2`, `minTimeout: 200ms`, `timeoutFactor: 2`)
- Add `X-Delivery-Id` header (stable UUID across retries) for idempotent processing on the receiver side
- Increase default `HTTP_TIMEOUT` from 1s → 5s; `connectTimeout` now also bounded by `HTTP_TIMEOUT`
- Add `HTTP_MAX_RETRIES` env var; remove `@nestjs/axios` and `axios` dependencies

## Notes

- `methods: ['POST']` is set explicitly — POST is not in undici's default retry method list, so omitting it would silently disable all retries
- Retry on 5xx implies potential duplicate delivery; use `X-Delivery-Id` to deduplicate on the receiver side
- Response body is always consumed (`body.text()`) as required by undici v8

235 of 272 branches covered (86.4%)

Branch coverage included in aggregate %.

42 of 42 new or added lines in 3 files covered. (100.0%)

3 existing lines in 1 file now uncovered.

610 of 704 relevant lines covered (86.65%)

16.84 hits per line

Coverage Regressions

Lines Coverage ∆ File
3
95.07
-2.59% src/modules/webhook/webhookDispatcher.service.ts
Jobs
ID Job ID Ran Files Coverage
1 run-test:e2e:cov - 24831904352.1 23 Apr 2026 11:10AM UTC 84
60.73
GitHub Action Run
2 run-test:cov - 24831904352.2 23 Apr 2026 11:11AM UTC 90
85.14
GitHub Action Run
Source Files on build 24831904352
  • Tree
  • List 46
  • Changed 24
  • Source Changed 3
  • Coverage Changed 24
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #24831904352
  • c9532000 on github
  • Prev Build on main (#24830421907)
  • Next Build on main (#24834990532)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc