diff --git a/firebase-functions/src/iosMain/kotlin/dev/gitlive/firebase/functions/functions.kt b/firebase-functions/src/iosMain/kotlin/dev/gitlive/firebase/functions/functions.kt index 2d4821709..2c706d725 100644 --- a/firebase-functions/src/iosMain/kotlin/dev/gitlive/firebase/functions/functions.kt +++ b/firebase-functions/src/iosMain/kotlin/dev/gitlive/firebase/functions/functions.kt @@ -63,7 +63,7 @@ suspend inline fun T.await(function: T.(callback: (NSError?) -> Unit) -> Uni if(error == null) { job.complete(Unit) } else { - job.completeExceptionally(FirebaseFunctionsException(error.toString())) + job.completeExceptionally(FirebaseFunctionsException(error.localizedDescription)) } } job.await() @@ -75,7 +75,7 @@ suspend inline fun T.awaitResult(function: T.(callback: (R?, NSEr if(error == null) { job.complete(result) } else { - job.completeExceptionally(FirebaseFunctionsException(error.toString())) + job.completeExceptionally(FirebaseFunctionsException(error.localizedDescription)) } } return job.await() as R