Apparently if we make a POST request and the Node.js server responds with 401 because the user's session has expired, the Nginx server just responds with 502 to the client so the mobile app doesn't know that we need to log in again.
This results in some upload failures that confuse the user.