-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Version Information
Server Version: 2.16.0
CLI Version (for CLI related issue): not CLI related
Environment
OSS
What is the current behaviour?
We have a Hasura instance connected to a Microsoft SQL Server 2016 (MSSQL) database configured with Modern_Spanish_CI_AS collation.
In this databases we have tables which contain Spanish characters (á, é, í, ñ...).
We created an Event Trigger that listens to updates on one of those tables. When the updated row contains one of those special characters, the trigger returns this message, doesn't execute the webhook, and stays in Pending status:
{"detail":{"code":"unexpected","error":"payload decode failed while fetching MSSQL events","path":"$"},"level":"error","timestamp":"2022-12-12T16:30:31.406+0000","type":"event-trigger"}
If we remove all the Spanish characters, delete all the SQL Server tables under hdb_catalog schema, and retry updating a row, the event trigger executes successfully, and changes to Delivered status; so we are sure that the special characters are causing the issue.
What is the expected behaviour?
The event trigger executes the configured webhook without errors, and change to Delivered status.
How to reproduce the issue?
- Create a MSSQL database with Modern_Spanish_CI_AS collation
- Create a table with some
varchar(n)columns - Populate the table with strings that contain Spanish characters (á, é, í, ó, ú, ñ, Ñ)
- In Hasura, create an Event Trigger that listens to updates on any column of the table
- Update the column value
Screenshots or Screencast
Please provide any traces or logs that could help here.
Any possible solutions/workarounds you're aware of?
The error is raised in this sentence:
encodePayload payload =
onLeft
(J.eitherDecode payload)
(\_ -> throw500 $ T.pack "payload decode failed while fetching MSSQL events")The line of code is:
| encodePayload payload = |
There is a related issue in which it seems that a similar bug was solved in the release 2.5.0:
Keywords
MSSQL, event trigger, payload decode