Hello, I'm trying to understand exception handling...
# ask-metaflow
a
Hello, I'm trying to understand exception handling in a metaflow step. I'm trying to get try, except, continue to work within a step, but metaflow keeps failing the whole step. I swear i had this working, but now can make sense of it. I'm not looking for @catch or retries here.
Copy code
@step
def partition(self):

   for document in documents:
      try:
         partition = partition_file(document.file_path)
      except Exception as e:
         print(f"File Partition Error: {document.file_path} \n {e}")
         continue

 self.next(self.chunk)
h
What's the error it's failing with? Do you have a minimal example to reproduce? Just from eyeballing your snippet it should work