python-discord / site

pythondiscord.com - A Django and Bulma web application.
https://pythondiscord.com
MIT License
640 stars 126 forks source link

Don't propagate the status received from Discord to GitHub Webhook #1281

Closed jb3 closed 6 months ago

jb3 commented 6 months ago

When we received a bad request exception from Discord (which is not actually representative of an error here), we were propagating this back to GitHub.

Instead, we should always return a success request if we have been successful in the proxy attempt, and return the downstream status code as a part of the response body.

This prevents GitHub Webhook Bad Requests being logged to site logs.

netlify[bot] commented 6 months ago

Deploy Preview for pydis-static ready!

Name Link
Latest commit 3d04acc24d32d82bf1d817adaae9c65a0cd7ef92
Latest deploy log https://app.netlify.com/sites/pydis-static/deploys/660aaefac93a1e0008d82e8e
Deploy Preview https://deploy-preview-1281--pydis-static.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

coveralls commented 6 months ago

Coverage Status

coverage: 100.0%. remained the same when pulling 3d04acc24d32d82bf1d817adaae9c65a0cd7ef92 on jb3/github-webhook-no-status into 04672bb2c5a60bf89bc92d11f97f2cf52d5578d0 on main.