Change error code in ping handler