def insert_into_error_log(error_obj,mongo): try: mongo['tbl_err_log'].insert(error_obj) except Exception as err: pass