handle html errors