How to ignore invalid tag name instead of throwing a error

Hi ,

I got the requirement to ignore the invalid tag name when execute a playbook

eg . ansible-playbook -t tag1 test.yml

and I will get below error and fail the playbook

ERROR: tag(s) not found in playbook: tag1.

What I expect is doing nothing if tag name is not exist just like --skip-tags all

PLAY [localhost] **************************************************************

PLAY RECAP ********************************************************************

If anyway I can do that ?

Thanks