inline fun fromJson(json: String): A { return try { jackson.readValue(json, A::class.java) } catch (x: Exception) { // can't catch here... throw BadRequestException() } }