error handling and automatic link for message