return code for Anaplan Connect

Hi, I'm using Anaplan Connect to automate my data loading. In order to use my batches in an scheduler I need to output the return codes of Anaplan Connect (ie. file not found, the certificate has expired, connection problem ....) How can I handle this topic? Thanks,