Wallet not connected issue

actully when i connect web3auth and loigin i put my ui for few mins or hours on hold that after some time i am trying to disconnect my wallet it gives me error wallet not connected … from where can i catch error that my provider is getting expire on which condition i have to check on who basis i can logout my page