/api/event
throws 500 for self-hosted instance
#1570
-
Past Issues Searched
Issue is a Bug Report
Describe the bugHello, I'm trying to use server side event submission via rest api and while trying with Sample payload:
this works well on plausible.io but not on self-hosted instance. I'm getting the following in server logs:
this happens only when i have Expected behaviorshould get 202 ScreenshotsNo response Environment- OS: Ubuntu 20.04
- Browser: Tested via insomnia rest client
- Browser Version: NA |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
This was fixed in 7a02aae Previously we expected the props to be JSON-stringified. This means double-encoding like this: {
"name": "download",
"url": "https://example.com/test1",
"domain": "example.com",
"props": "{\"document\": \"a.txt\"}"
} This is quite ugly and suboptimal so I made a change where you can send them as part of the regular JSON payload. The fix is not released yet but in the meanwhile you can stringify the props before sending them. |
Beta Was this translation helpful? Give feedback.
This was fixed in 7a02aae
Previously we expected the props to be JSON-stringified. This means double-encoding like this:
This is quite ugly and suboptimal so I made a change where you can send them as part of the regular JSON payload. The fix is not released yet but in the meanwhile you can stringify the props before sending them.