Skip to content

Conversation

@jingyugao
Copy link

@jingyugao jingyugao commented Dec 2, 2025

Previously, webhook notifications would fail if they contained unicode characters in the alert data. This was because the JSON payload was not UTF-8 encoded before being sent.

This commit fixes the issue by explicitly encoding the JSON data to UTF-8 and adds a test to verify the fix.

What type of PR is this?

  • Refactor
  • Feature
  • Bug Fix
  • New Query Runner (Data Source)
  • New Alert Destination
  • Other

Description

How is this tested?

  • Unit tests (pytest, jest)
  • E2E Tests (Cypress)
  • Manually
  • N/A

Related Tickets & Documents

#7468

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

Previously, webhook notifications would fail if they contained unicode characters in the alert data. This was because the JSON payload was not UTF-8 encoded before being sent.

This commit fixes the issue by explicitly encoding the JSON data to UTF-8 and adds a test to verify the fix.
@yoshiokatsuneo
Copy link
Contributor

@jingyugao

Thank you for your contribution!
I confirmed that the PR works well.

And, if we create a test, I think the test should be in the file related to the class, like test/destinations/test_webhook.py.

Also, I think the test is optional for this quite simple PR.

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