error check in HttpApp