Transform 500 remote error to 502