Added check for local ajax errors.