In case of errors, return a simple dictionary instead of pickled exception.
Pros:
- Language-independent
- Works with unpickleable exceptions (eg. cimpl.KafkaException, and RLock objects in exceptions raised by tenacity)
Con:
- Shows a less nice error on the client side (if the client is in Python), unless the error is whitelisted in reraise_exceptions.