<Type mismatch: inferred type is Resource&lt;Excep...
# stackoverflow
r
Type mismatch: inferred type is Resource&lt;Exception&gt; but Resource&lt;T&gt; was expected For my firebase job I created base firebase repository to handle onSuccess and on error. I can use it for all my firebase job but when I try to handle error I got this error. why can I post documentReference but can't post exception. Here is my code: suspend inline fun firebaseJob(crossinline task: () -> Task): Resource { return withContext(Dispatchers.IO) { try { suspendCancellableCoroutine { continuation -> task().addOnSuccessListener {...