Convert all exceptions into JSON responses