{ data class Success(val data: List<KeywordResult>): Response() data class Error(val e: Exception): Response() } w (JU)VC"1*ͷΫϥΠΞϯτΛ$-* J04ڞ௨ͷϞδϡʔϧͱ࣮ͯ͠ ͢Δ w "QJ$MJFOUΫϥε w TFBSDIͰ࣮ߦ݁Ռ3FTQPOTFΛฦ͢
{ data class Success(val data: List<KeywordResult>): Response() data class Error(val e: Exception): Response() } w 4XJGU͔ΒͲ͏ݟ͑Δ͔ؾʹͳΔ෦ w TFBMFEDMBTT w TVTQFOEGVO
Response.Error): … default: fatalError("unknown case.") } w ཏੑνΣοΫ͕Ͱ͖ͳ͍ w গ͠ʹ͍͋͛ͯΔJTTVF͕͋ͬͨ w IUUQTHJUIVCDPN+FU#SBJOTLPUMJOOBUJWFJTTVFT w ͜ͷJTTVFࣗମ4XJGU0CK$ͰFOVNΛαϙʔτͯ͠΄͍͠ͱ ͍͏༰ɻͦͷதͰগ͠৮ΕΒΕ͍ͯΔఔ