some generic and ugly exception mapper
Merge branch 'handle-exceptions'