error handling for get_message
 instead of