Using AsyncResultHandler for error handling