Skip to content

fix: webhook timeouts, API key scoping, query optimization, and error localization - #596

Merged
ritaifeoluwa merged 4 commits into
SmartDropLabs:mainfrom
fortezzalaboratory:fix-webhook-api-db-errors
Oct 19, 2026
Merged

ritaifeoluwa merged 4 commits into
SmartDropLabs:mainfrom
fortezzalaboratory:fix-webhook-api-db-errors

Conversation

@fortezzalaboratory

Copy link
Copy Markdown
Contributor

What

Fixes four critical issues: webhook timeout handling, API key scoping, database query optimization, and error message localization.

Issues Resolved

Closes #568
Closes #569
Closes #570
Closes #571

Changes

#568 - Webhook timeout not handled

Enhanced webhook delivery error handling to distinguish timeout errors (ETIMEDOUT) from other network errors, enabling better logging and metrics tracking for timeout-specific issues.

#569 - No API key scoping

Added API key scope requirements to all airdrop mutation endpoints (POST /airdrops, PATCH, DELETE, /cancel, /recipients) to prevent over-privileged API keys from performing sensitive operations.

#570 - No query optimization

Added composite database indexes for common query patterns:

  • Recipients: (airdrop_id, created_at DESC)
  • Alerts: (asset, status, created_at DESC)
  • Webhooks: (active, event_type)
  • API key audit logs: (key_id, created_at DESC)

These improve query performance for filtering and sorting operations.

#571 - Error responses not localized

Implemented i18n service supporting error message localization for English, Spanish, and French. Error responses automatically localize based on Accept-Language header.

Enforces 'airdrops' scope requirement on all POST, PATCH, and DELETE airdrop endpoints to prevent over-privileged API keys from performing sensitive operations.

Resolves SmartDropLabs#569
Creates composite indexes on frequently queried column combinations to improve query performance and reduce database load during filtering and sorting operations.

Resolves SmartDropLabs#570
Implements i18n service for error messages with support for English, Spanish, and French. Error responses are automatically localized based on the Accept-Language header.

Resolves SmartDropLabs#571
@drips-wave

drips-wave Bot commented Oct 19, 2026

Copy link
Copy Markdown

@fortezzalaboratory 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! 🚀

Learn more about application limits

@ritaifeoluwa
ritaifeoluwa merged commit 8b84500 into SmartDropLabs:main Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] Error responses not localized [performance] No query optimization [security] No API key scoping [bug] Webhook timeout not handled

2 participants