Hi everyone. Ive been looking this up and cant find anything. Anytime I send a DELETE request via postman to my django backend hosted with the DigitalOcean app platform I get the error seen below. This is only for DELETE http requests. All others work perfectly fine. This app is linked to a DO managed postgreql db. I get absolutely no issues when running the backend locally and sending delete requests but any delete request sent to the deployed version gets this error. Help would be very appreciated. Thank you.
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex">
<style>body,html{height:100%;margin:0}body{display:flex;align-items:center;justify-content:center;flex-direction:column;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}p{text-align:center;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;color:#000;font-size:14px;margin-top:-50px}p.code{font-size:24px;font-weight:500;border-bottom:1px solid #e0e1e2;padding:0 20px 15px}p.text{margin:0}a,a:visited{color:#aaa}</style>
</head>
<body>
<p class="code">
Error
</p>
<p class="text">
We encountered an error when trying to load your application and your page could not be served. Check the logs for your application in the App Platform dashboard.
</p>
<div style="display:none;">
<h1>
upstream_reset_before_response_started{protocol_error} (502 UPE) </h1>
<p data-translate="connection_timed_out">App Platform failed to forward this request to the application.</p>
</div>
</body>
</html>
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Hi there,
This is quite interesting, receiving a 502 error only for DELETE requests can be tricky to diagnose, essentially as all other requests are working as expected.
There are a few things that I could suggest:
The error message suggests checking the logs for your application in the App Platform dashboard. These logs might provide more specific information about what’s causing the
DELETE
requests to fail.Ensure that your Django app is correctly configured to handle
DELETE
requests. This includes checking the views and URL routing in your Django app.Since you’re using a DigitalOcean Managed PostgreSQL database, verify that the database permissions allow
DELETE
operations. Restrictions at the database level might result in errors when the application attempts to execute such queries:If you’re unable to resolve the issue through these steps, reaching out to DigitalOcean support with detailed information about your configuration and the error might provide more insight:
Hope that helps!
- Bobby.