Hi,
I’m working on a small RPA tool that submits information on a webpage. For this, I’ve created four main functions: login, get_info, submit, and save_submission (these are just example names). All these functions interact with a web API, database, or similar external resources.
I’m unsure where to place try/except blocks in my code. Specifically, I’m not sure if it’s necessary to include them in every function and in the main function, or if it’s better to limit them to only the smaller functions that interact with external resources.
Currently, the smaller functions (which are called by the four main functions) already have try/except blocks for handling external requests. Should I also wrap the main functions and the main script in try/except, or is this redundant?
I’d appreciate any advice on how to minimize and optimize the use of try/except in this scenario. Thanks in advance for your help! 