properly catch exceptions from querying server with sequence command