improved error handling for get command