Skip to content

Commit 2c40ada

Browse files
committed
Add conversion and changelog
1 parent a7f489d commit 2c40ada

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

firebase-ai/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Unreleased
2+
* [changed] Added better description for requests which fail due to the Gemini API not being
3+
configured.
24
* [feature] added support for Imagen Editing, including inpainting, outpainting, control, style
35
transfer, and subject references (#7075)
46

firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Exceptions.kt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ internal constructor(message: String, cause: Throwable? = null) : RuntimeExcepti
6161
ContentBlockedException(cause.message ?: "", cause.cause)
6262
is com.google.firebase.ai.common.QuotaExceededException ->
6363
QuotaExceededException(cause.message ?: "", cause.cause)
64+
is com.google.firebase.ai.common.NotConfiguredException ->
65+
NotConfiguredException(cause.cause)
6466
else -> UnknownException(cause.message ?: "", cause)
6567
}
6668
is TimeoutCancellationException ->
@@ -149,6 +151,16 @@ internal constructor(message: String, cause: Throwable? = null) :
149151
public class UnsupportedUserLocationException internal constructor(cause: Throwable? = null) :
150152
FirebaseAIException("User location is not supported for the API use.", cause)
151153

154+
/**
155+
* The user's project does not have the Gemini Developer API enabled in the Firebase Console.
156+
*
157+
* See the Firebase documentation for the
158+
* [steps](https://firebase.google.com/docs/ai-logic/faq-and-troubleshooting?api=dev#error-genai-config-not-found)
159+
* to enable the Gemini Developer API.
160+
*/
161+
internal class NotConfiguredException internal constructor(cause: Throwable? = null) :
162+
FirebaseAIException("Gemini Developer API not enabled in Firebase console.", cause)
163+
152164
/**
153165
* Some form of state occurred that shouldn't have.
154166
*

0 commit comments

Comments
 (0)