-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Discord Webhook Error 400 #34027
Comments
Do you mean that:
|
What's the previous version? |
Push works, correct. Custom Release does not. I did not test all events. Previous version was v1.23.5 I believe. I can reproduce this on the demo site. |
That's really strange, there is no related change between them: v1.23.5...v1.23.6 Changelog does mention some webhook related changes in other releases: https://github.com/go-gitea/gitea/blob/main/CHANGELOG.md It's safe to switch the version between 1.23.x, could you try to downgrade to an older version to check which release started breaking? |
And one more thing, IIRC the "test delivery" button doesn't send "release" events. So maybe you need to manually trigger a "release" event, and try to check the "Header" & "Content" on the "Request" tab to see whether they are right (eg: try to send that content by CURL) |
That makes more sense as to what is occurring. The test button indeed does not work if it is set to custom->release. There is no message to indicate that it shouldn't work, and ideally it would be functional or disabled. That being said, I narrowed it down to message content. I believe it may be due to message length as it was over 2,000 characters. The release notes were rather long. If that is indeed the case, I suppose in an ideal situation the message content would be truncated to fit content restrictions prior to being sent. |
Good catch, if so, then it is not a regression but an old bug: the release message exceeds discord's limit, right? |
Yes, I believe so. The documentation breaks down character limits for the embed. While I did not exceed the overall limit, I believe I was over the limit of "Embed descriptions are limited to 2048 characters". |
To add a bit more info here, I was able to debug my webhook message a bit using the Embed Visualizer. I copy and pasted the content section from my Gitea webhook failure and then clicked "Enable Webhook Mode" in the Embed Visualizer. This was the output:
|
Description
After updating Gitea my Discord notifications no longer work. I did not change any configuration in Gitea or on Discord. I am able to send a curl test message to my webhook. Sending a test message to my webhook gives the following response:
Error 400
Headers:
Body:
I tried deleting the webhook in Gitea and recreating it but now when I click "Test Delivery" nothing happens and there is nothing in "Recent Deliveries".
Edit: On further investigation it appears to be broken when changing the trigger from Push Events to Custom Events. My only marked Custom Event is "Release".
Gitea Version
1.23.6
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
Docker
Database
None
The text was updated successfully, but these errors were encountered: