Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(webhooks): streamline webhook response data #1696

Merged
merged 4 commits into from
Apr 22, 2021

Conversation

mantariksh
Copy link
Contributor

Problem

The webhook response data stored in the database has a couple of superfluous fields:

  1. errorMessage is useless because it is always a standard axios error message, e.g. "Request failed with status code 400".
  2. statusText is useless because it is just the standard HTTP status text, e.g. 'OK' for 200

Furthermore, fields that should always be present (webhook URL, signature, status code) are not marked as required in the database schema.

Solution

Remove the superfluous fields and mark the rest as required where appropriate. headers and data were not made required as they may be empty strings.

Copy link
Contributor

@karrui karrui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mantariksh mantariksh merged commit ad597a7 into develop Apr 22, 2021
@mantariksh mantariksh deleted the feat/streamline-webhook-responses branch May 18, 2021 08:29
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.

2 participants