The possibility to handle errors in some connectors
In some connectors for example FileSystem we need the ability to handle errors and sometimes ignore them.
As connector operations are now code-based, you can handle errors using Try.run().
For example, you can attempt to delete a file and handle any errors without stopping the workflow:
// Attempt to delete a file
let result = Try.run(
() => FileSystem_DeleteFile(FilePath)
);
// Check if the operation succeeded
let success = result.error is null;
// Return the result without stopping the workflow
return {
Success: success,
ErrorMessage: case
when success then null
else str(result.error)
end
};
Closing the suggestion as completed.
-
This feature is under review for Flow Connect File System Connector.
-
Mikael Gillberg
commented
To be able to have an error handling that is worthy of the name in mission-critical systems, this function is a must. I would argue that it is more of a bug than a new feature. Error handling must always be present, especially in something as important as a connector.