Error handling for get logs