We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 50aa9d2 commit c92ce31Copy full SHA for c92ce31
1 file changed
data/core/src/main/java/com/yapp/ngdl/data/core/model/BaseResponse.kt
@@ -10,5 +10,5 @@ data class BaseResponse<T>(
10
)
11
12
fun <T> BaseResponse<T>.getData(): T {
13
- return data ?: Unit as T
+ return data ?: error("Response data is null. code=$code, message=$message")
14
}
0 commit comments