adding error handling to messenger and returning the last result of the callback stack