Allow funced to retry on error

Fixes #1371