improve flexibility of error handling for json dispatcher
Merge pull request #101 from trecouvr/improve-errorhandling

improve flexibility of error handling for json dispatcher