Added logging on proxy side when sending BAD_GATEWAY