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

Posted at Nginx Forum:,64279,64279#msg-64279

error_page 502 =200 /xxx$is_args$args;

Posted at Nginx Forum:,64279,64288#msg-64288