Error_page can redirect to other url with original args?

if all upstream servers are all down,then nginx disposes 502 and the
original args is empty.
if I want to redirect 502 to other handler with original args, how can I
do?

Posted at Nginx Forum:

error_page 502 =200 /xxx$is_args$args;

Posted at Nginx Forum: