PE-5869 Provide error details on proxying failure

This PR adds support for handling proxying failures so that in case of a proxying failure we could show something better than a blank page and status code 502.
`:failure-callback-fn` mebbe?