Custom serializers for exceptions thrown by tasks