Clarification on error middleware documentation

I was reading your documentation about error pages middleware. There, you have this image (I added numbers on arrows myself):

I have the following questions:

  1. Are the numbers on the arrows in the correct order?
  2. Does Traefik have to receive HTTP error code from the application itself? What if application is not working and is not able to send any HTTP code?
  3. Let's assume that application is in the process of re-deployment (its service was deleted and created). The applications hasn't started yet, it takes around 30 seconds for it to load all the assemblies and configure itself. In such case, Traefik displays 502 Bad Gateway, even if custom error middleware for 502 is registered. How can we display custom 502.html error page in this case (application is not able to send 502 response because it hasn't started yet)?