-
Notifications
You must be signed in to change notification settings - Fork 598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
m161 release #6760
base: releases/m161
Are you sure you want to change the base?
m161 release #6760
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Test Results 1 051 files ±0 1 051 suites ±0 34m 51s ⏱️ +14s For more details on these failures, see this check. Results for commit de40e0a. ± Comparison against base commit db0b882. ♻️ This comment has been updated with latest results. |
Size Report 1Affected Products
Test Logs |
Coverage Report 1This report is too large (237,539 characters) to be displayed here in a GitHub comment. Please use the below link to see the full report on Google Cloud Storage.Test Logs |
Throwing inside the `PublisherStream` causes a Runtime exception that can't be caught in the call site. Instead, we should use `notifyError()` so that the error can be caught in the `Subscriber#onError()` function. I tried to catch the exception using both of the code snippets below, but none of them worked. (they both work with the changes in this PR): ```kotlin functions.getHttpsCallable("nonExistentFunction") .stream().asFlow() .catch { // Handle error for a 404 function } .collect { // ... } ``` ```kotlin try { functions.getHttpsCallable("nonExistentFunction") .stream().asFlow() .collect { // ... } } catch(e: Exception) { // Handle error for a 404 function } ``` Runtime exception thrown: ``` FATAL EXCEPTION: OkHttp Dispatcher Process: com.google.samples.quickstart.functions, PID: 13321 com.google.firebase.functions.FirebaseFunctionsException: Value <html><head> of type java.lang.String cannot be converted to JSONObject Unexpected Response: <html><head> <meta http-equiv="content-type" content="text/html;charset=utf-8"> <title>404 Page not found</title> </head> <body text=#000000 bgcolor=#ffffff> <h1>Error: Page not found</h1> <h2>The requested URL was not found on this server.</h2> <h2></h2> </body></html> at com.google.firebase.functions.PublisherStream.validateResponse(PublisherStream.kt:316) at com.google.firebase.functions.PublisherStream.access$validateResponse(PublisherStream.kt:41) at com.google.firebase.functions.PublisherStream$startStreaming$1$4.onResponse(PublisherStream.kt:161) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:203) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1156) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:651) at java.lang.Thread.run(Thread.java:1119) ```
Auto-generated PR for release m161