go error handling ai agents