recoverTotal takes a function to manage errors and returns a default value:- it ends the JsResult modification chain and returns the successful inner value- or if detected a failure, it returns the result of the function provided to recoverTotal.