When using API to upload file via URL, the upload url sometimes returns 502 status code

tshek
Community Novice

I'm using the file upload API to upload files to user accounts via a URL. When I post to the upload_url provided by the API endpoint (e.g. "users/1234/files?as_user_id=1234"), it usually returns a 201 HTTP status code. However, I sometimes get a 502 HTTP status code & HTML that looks like this:

<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
</body>
</html>

When I check the progress URL for the upload later, though, it shows that the upload has completed successfully. So it looks like the 502 status code does not indicate an error situation? How do I detect that errors that occur for the post to the upload_url, then?

Labels (2)