app: fixed app  error hander and escape the rule part that is not label pattern