Enhance error handling for the Go client