Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,13 @@ public class FirebaseConfigValueProvider(
*
* @param activate When `true`, calls `fetchAndActivate()` so values become available
* immediately after this call. When `false`, only fetches without activating.
* @throws FetchException if the Firebase fetch operation fails (e.g. network error,
* timeout, or service unavailability). The [FetchException.cause] holds the original
* exception for diagnostics. See [FetchException] for retry recommendations.
* @throws FetchException if the Firebase fetch operation fails for any reason, including
* network errors, timeouts, or service unavailability. This wraps all non-cancellation
* exceptions — including [RuntimeException] thrown by [kotlinx.coroutines.tasks.await]
* on Firebase task failure. The [FetchException.cause] holds the original exception for
* diagnostics. See [FetchException] for retry recommendations.
Comment on lines +89 to +93
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

KDoc says the fetch operation fails "for any reason" but the implementation only wraps non-cancellation Exceptions (and will still let non-Exception Throwables like Error propagate). Consider tightening the wording to match the actual behavior: wraps all non-cancellation exceptions thrown by await() / Firebase APIs.

Suggested change
* @throws FetchException if the Firebase fetch operation fails for any reason, including
* network errors, timeouts, or service unavailability. This wraps all non-cancellation
* exceptions — including [RuntimeException] thrown by [kotlinx.coroutines.tasks.await]
* on Firebase task failure. The [FetchException.cause] holds the original exception for
* diagnostics. See [FetchException] for retry recommendations.
* @throws FetchException if [kotlinx.coroutines.tasks.await] or the underlying Firebase
* Remote Config APIs throw a non-cancellation [Exception] while fetching, including
* errors such as network failures, timeouts, or service unavailability. The
* [FetchException.cause] holds the original exception for diagnostics. See
* [FetchException] for retry recommendations.

Copilot uses AI. Check for mistakes.
* @throws kotlinx.coroutines.CancellationException if the coroutine is cancelled while
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency with the rest of the file (e.g., @throws IllegalStateException above) and to avoid redundancy with the existing import, consider using CancellationException instead of the fully-qualified kotlinx.coroutines.CancellationException in the @throws tag.

Suggested change
* @throws kotlinx.coroutines.CancellationException if the coroutine is cancelled while
* @throws CancellationException if the coroutine is cancelled while

Copilot uses AI. Check for mistakes.
* the fetch is in progress; propagated without wrapping.
*/
override suspend fun fetch(activate: Boolean) {
val task =
Expand Down
Loading