Many times, Portainer errors can be confusing, like 'Request failed with status code 500.' What actually went wrong? In today's blog post, I'll cover the steps to locate the real error so you can move on to finding the solution. The steps are as follows
Via Portainer UI
- Open Developer Tools in your browser (Press
F12orCtrl + Shift + I/Cmd + Opt + I). - Click on the Network tab.
- Re-run the action in Portainer that caused the 500 error.

- Look for the red line showing a failed API request (usually a
POSTorPUTrequest). - Click it, and select the Response or Preview tab. You will see a specific JSON error message from Docker

Via CLI (Require Access to Portainer Host)
- run command such as to grep 500 http error code
docker logs portainer --tail 50 2>&1 | grep -i "500\|error"
On my case the error is DNS issue - real error message
{
"message": "failed to deploy a stack: compose up operation failed: Error response from daemon: Get \"https://registry-1.docker.io/v2/\": dial tcp: lookup registry-1.docker.io on 192.168.1.1:53: read udp 192.168.1.104:55924->192.168.1.1:53: i/o timeout",
"details": "Failed to deploy a stack: compose up operation failed: Error response from daemon: Get \"https://registry-1.docker.io/v2/\": dial tcp: lookup registry-1.docker.io on 192.168.1.1:53: read udp 192.168.1.104:55924->192.168.1.1:53: i/o timeout"
}



