failure ( let error ) : print ( "Parser error \( error ) " ) completion ? I have a switch case of my result in the ViewModel (getting the data, getting the error) but also in my View (getting the success of the request, getting the result). onErrorHandling = { error in // display error } self .