How can I find the potion details?

So I have this command to check for a thrown potion (while in air) to execute a certain command, but the problem is that I don't know how to check for that potion effects? Is there a way to check for them?execute if entity @e[type=potion,sort=nearest,limit=1,(idk this part)] run ...

Continue to help post