Skip to content

Conversation

rlazo
Copy link
Collaborator

@rlazo rlazo commented Mar 12, 2025

There is an extra copy of some tests inside test/.../common directory. This change removes them, and in the process:

  • Adds missing tests to the correct test file
  • Gets rid of duplicated tests and test-util code
  • Adds an exception type for quota exceeded

rlazo added 9 commits March 12, 2025 14:23
The SDK already supported parsing this specific error, but didn't have
a type to expose is to the public
All tests are covered by the non `common/` version of the tests
All files are covered in the non `common/` version of the tests
It was trying to access internal parts of the code unnecessarily
@rlazo rlazo requested review from davidmotson and daymxn March 12, 2025 20:16
Copy link
Contributor

github-actions bot commented Mar 12, 2025

Javadoc Changes:
--- /home/runner/diff/original/firebase-kotlindoc/android/client/firebase-vertexai/_toc.yaml	2025-03-13 17:20:36.264688253 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/client/firebase-vertexai/_toc.yaml	2025-03-13 17:18:26.329883108 +0000
@@ -158,6 +158,8 @@
       path: "/docs/reference/android/com/google/firebase/vertexai/type/InvalidStateException.html"
     - title: "PromptBlockedException"
       path: "/docs/reference/android/com/google/firebase/vertexai/type/PromptBlockedException.html"
+    - title: "QuotaExceededException"
+      path: "/docs/reference/android/com/google/firebase/vertexai/type/QuotaExceededException.html"
     - title: "RequestTimeoutException"
       path: "/docs/reference/android/com/google/firebase/vertexai/type/RequestTimeoutException.html"
     - title: "ResponseStoppedException"
--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/vertexai/type/FirebaseVertexAIException.html	2025-03-13 17:20:36.267688272 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/vertexai/type/FirebaseVertexAIException.html	2025-03-13 17:18:26.333883132 +0000
@@ -42,7 +42,7 @@
       </table>
     </div>
     <div class="devsite-table-wrapper"><devsite-expandable><span class="expand-control jd-sumtable-subclasses">Known direct subclasses
-        <div class="showalways" id="subclasses-direct"><a href="/docs/reference/android/com/google/firebase/vertexai/type/ContentBlockedException.html">ContentBlockedException</a>, <a href="/docs/reference/android/com/google/firebase/vertexai/type/InvalidAPIKeyException.html">InvalidAPIKeyException</a>, <a href="/docs/reference/android/com/google/firebase/vertexai/type/InvalidLocationException.html">InvalidLocationException</a>, <a href="/docs/reference/android/com/google/firebase/vertexai/type/InvalidStateException.html">InvalidStateException</a>, <a href="/docs/reference/android/com/google/firebase/vertexai/type/PromptBlockedException.html">PromptBlockedException</a>, <a href="/docs/reference/android/com/google/firebase/vertexai/type/RequestTimeoutException.html">RequestTimeoutException</a>, <a href="/docs/reference/android/com/google/firebase/vertexai/type/ResponseStoppedException.html">ResponseStoppedException</a>, <a href="/docs/reference/android/com/google/firebase/vertexai/type/SerializationException.html">SerializationException</a>, <a href="/docs/reference/android/com/google/firebase/vertexai/type/ServerException.html">ServerException</a>, <a href="/docs/reference/android/com/google/firebase/vertexai/type/ServiceDisabledException.html">ServiceDisabledException</a>, <a href="/docs/reference/android/com/google/firebase/vertexai/type/UnknownException.html">UnknownException</a>, <a href="/docs/reference/android/com/google/firebase/vertexai/type/UnsupportedUserLocationException.html">UnsupportedUserLocationException</a></div>
+        <div class="showalways" id="subclasses-direct"><a href="/docs/reference/android/com/google/firebase/vertexai/type/ContentBlockedException.html">ContentBlockedException</a>, <a href="/docs/reference/android/com/google/firebase/vertexai/type/InvalidAPIKeyException.html">InvalidAPIKeyException</a>, <a href="/docs/reference/android/com/google/firebase/vertexai/type/InvalidLocationException.html">InvalidLocationException</a>, <a href="/docs/reference/android/com/google/firebase/vertexai/type/InvalidStateException.html">InvalidStateException</a>, <a href="/docs/reference/android/com/google/firebase/vertexai/type/PromptBlockedException.html">PromptBlockedException</a>, <a href="/docs/reference/android/com/google/firebase/vertexai/type/QuotaExceededException.html">QuotaExceededException</a>, <a href="/docs/reference/android/com/google/firebase/vertexai/type/RequestTimeoutException.html">RequestTimeoutException</a>, <a href="/docs/reference/android/com/google/firebase/vertexai/type/ResponseStoppedException.html">ResponseStoppedException</a>, <a href="/docs/reference/android/com/google/firebase/vertexai/type/SerializationException.html">SerializationException</a>, <a href="/docs/reference/android/com/google/firebase/vertexai/type/ServerException.html">ServerException</a>, <a href="/docs/reference/android/com/google/firebase/vertexai/type/ServiceDisabledException.html">ServiceDisabledException</a>, <a href="/docs/reference/android/com/google/firebase/vertexai/type/UnknownException.html">UnknownException</a>, <a href="/docs/reference/android/com/google/firebase/vertexai/type/UnsupportedUserLocationException.html">UnsupportedUserLocationException</a></div>
       </span>
       <div id="subclasses-direct-summary">
         <div class="devsite-table-wrapper">
@@ -81,6 +81,12 @@
                 </td>
               </tr>
               <tr>
+                <td><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/QuotaExceededException.html">QuotaExceededException</a></code></td>
+                <td>
+                  <p>The request has hit a quota limit.</p>
+                </td>
+              </tr>
+              <tr>
                 <td><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/RequestTimeoutException.html">RequestTimeoutException</a></code></td>
                 <td>
                   <p>A request took too long to complete.</p>
--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/vertexai/type/QuotaExceededException.html	1970-01-01 00:00:00.000000000 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/vertexai/type/QuotaExceededException.html	2025-03-13 17:18:26.335883145 +0000
@@ -0,0 +1,179 @@
+<html devsite="true">
+  <head>
+    <title>QuotaExceededException</title>
+{% setvar book_path %}/_book.yaml{% endsetvar %}
+{% include "docs/reference/android/_reference-head-tags.html" %}
+  </head>
+  <body>
+    <div id="metadata-info-block"></div>
+    <h1>QuotaExceededException</h1>
+    <p>
+      <pre>public final class <a href="/docs/reference/android/com/google/firebase/vertexai/type/QuotaExceededException.html">QuotaExceededException</a> extends <a href="/docs/reference/android/com/google/firebase/vertexai/type/FirebaseVertexAIException.html">FirebaseVertexAIException</a></pre>
+    </p>
+    <div class="devsite-table-wrapper">
+      <table class="jd-inheritance-table">
+        <tbody>
+          <tr>
+            <td colspan="6"><a href="https://developer.android.com/reference/kotlin/java/lang/Object.html">java.lang.Object</a></td>
+          </tr>
+          <tr>
+            <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;↳</td>
+            <td colspan="5"><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html">kotlin.Throwable</a></td>
+          </tr>
+          <tr>
+            <td>&nbsp;</td>
+            <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;↳</td>
+            <td colspan="4"><a href="https://developer.android.com/reference/kotlin/java/lang/Exception.html">java.lang.Exception</a></td>
+          </tr>
+          <tr>
+            <td>&nbsp;</td>
+            <td>&nbsp;</td>
+            <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;↳</td>
+            <td colspan="3"><a href="https://developer.android.com/reference/kotlin/java/lang/RuntimeException.html">java.lang.RuntimeException</a></td>
+          </tr>
+          <tr>
+            <td>&nbsp;</td>
+            <td>&nbsp;</td>
+            <td>&nbsp;</td>
+            <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;↳</td>
+            <td colspan="2"><a href="/docs/reference/android/com/google/firebase/vertexai/type/FirebaseVertexAIException.html">com.google.firebase.vertexai.type.FirebaseVertexAIException</a></td>
+          </tr>
+          <tr>
+            <td>&nbsp;</td>
+            <td>&nbsp;</td>
+            <td>&nbsp;</td>
+            <td>&nbsp;</td>
+            <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;↳</td>
+            <td colspan="1"><a href="/docs/reference/android/com/google/firebase/vertexai/type/QuotaExceededException.html">com.google.firebase.vertexai.type.QuotaExceededException</a></td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <hr>
+    <p>The request has hit a quota limit. Learn more about quotas in the <a href="https://firebase.google.com/docs/vertex-ai/quotas">Firebase documentation.</a></p>
+    <h2>Summary</h2>
+    <div class="devsite-table-wrapper">
+      <table class="responsive" id="inhmethods">
+        <thead>
+          <tr>
+            <th colspan="100%"><h3>Inherited fields</h3></th>
+          </tr>
+        </thead>
+        <tbody class="list">
+          <tr>
+            <td><devsite-expandable><span class="expand-control">From <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html">kotlin.Throwable</a></span>
+              <div class="devsite-table-wrapper">
+                <table class="responsive">
+                  <colgroup>
+                    <col width="40%">
+                    <col>
+                  </colgroup>
+                  <tbody class="list">
+                    <tr>
+                      <td><code><a href="https://developer.android.com/reference/kotlin/java/lang/Throwable.html">Throwable</a></code></td>
+                      <td>
+                        <div><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/cause.html">cause</a></code></div>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td><code><a href="https://developer.android.com/reference/kotlin/java/lang/String.html">String</a></code></td>
+                      <td>
+                        <div><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/message.html">message</a></code></div>
+                      </td>
+                    </tr>
+                  </tbody>
+                </table>
+              </div>
+</devsite-expandable>            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <div class="devsite-table-wrapper">
+      <table class="responsive" id="inhmethods">
+        <thead>
+          <tr>
+            <th colspan="100%"><h3>Inherited methods</h3></th>
+          </tr>
+        </thead>
+        <tbody class="list">
+          <tr>
+            <td><devsite-expandable><span class="expand-control">From <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html">kotlin.Throwable</a></span>
+              <div class="devsite-table-wrapper">
+                <table class="responsive">
+                  <colgroup>
+                    <col width="40%">
+                    <col>
+                  </colgroup>
+                  <tbody class="list">
+                    <tr>
+                      <td><code>final void</code></td>
+                      <td>
+                        <div><code><a href="https://developer.android.com/reference/kotlin/java/lang/Throwable.html#addSuppressed-kotlin.Throwable-">addSuppressed</a>(@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull.html">RecentlyNonNull</a> @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/lang/Throwable.html">Throwable</a>&nbsp;p0)</code></div>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td><code>@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/lang/Throwable.html">Throwable</a></code></td>
+                      <td>
+                        <div><code>@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull.html">RecentlyNonNull</a><br><a href="https://developer.android.com/reference/kotlin/java/lang/Throwable.html#fillInStackTrace--">fillInStackTrace</a>()</code></div>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td><code>@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/lang/String.html">String</a></code></td>
+                      <td>
+                        <div><code>@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNullable.html">RecentlyNullable</a><br><a href="https://developer.android.com/reference/kotlin/java/lang/Throwable.html#getLocalizedMessage--">getLocalizedMessage</a>()</code></div>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td><code>@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> StackTraceElement[]</code></td>
+                      <td>
+                        <div><code>@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull.html">RecentlyNonNull</a><br><a href="https://developer.android.com/reference/kotlin/java/lang/Throwable.html#getStackTrace--">getStackTrace</a>()</code></div>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td><code>final @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> Throwable[]</code></td>
+                      <td>
+                        <div><code>@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull.html">RecentlyNonNull</a><br><a href="https://developer.android.com/reference/kotlin/java/lang/Throwable.html#getSuppressed--">getSuppressed</a>()</code></div>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td><code>@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/lang/Throwable.html">Throwable</a></code></td>
+                      <td>
+                        <div><code>@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull.html">RecentlyNonNull</a><br><a href="https://developer.android.com/reference/kotlin/java/lang/Throwable.html#initCause-kotlin.Throwable-">initCause</a>(@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNullable.html">RecentlyNullable</a> @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/lang/Throwable.html">Throwable</a>&nbsp;p0)</code></div>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td><code>void</code></td>
+                      <td>
+                        <div><code><a href="https://developer.android.com/reference/kotlin/java/lang/Throwable.html#printStackTrace--">printStackTrace</a>()</code></div>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td><code>void</code></td>
+                      <td>
+                        <div><code><a href="https://developer.android.com/reference/kotlin/java/lang/Throwable.html#printStackTrace-java.io.PrintStream-">printStackTrace</a>(@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull.html">RecentlyNonNull</a> @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/io/PrintStream.html">PrintStream</a>&nbsp;p0)</code></div>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td><code>void</code></td>
+                      <td>
+                        <div><code><a href="https://developer.android.com/reference/kotlin/java/lang/Throwable.html#printStackTrace-java.io.PrintWriter-">printStackTrace</a>(@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull.html">RecentlyNonNull</a> @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/io/PrintWriter.html">PrintWriter</a>&nbsp;p0)</code></div>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td><code>void</code></td>
+                      <td>
+                        <div><code><a href="https://developer.android.com/reference/kotlin/java/lang/Throwable.html#setStackTrace-kotlin.Array[java.lang.StackTraceElement]-">setStackTrace</a>(@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull.html">RecentlyNonNull</a> @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> StackTraceElement[]&nbsp;p0)</code></div>
+                      </td>
+                    </tr>
+                  </tbody>
+                </table>
+              </div>
+</devsite-expandable>            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+  </body>
+</html>
+
--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/vertexai/type/package-summary.html	2025-03-13 17:20:36.269688284 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/vertexai/type/package-summary.html	2025-03-13 17:18:26.335883145 +0000
@@ -372,6 +372,12 @@
             </td>
           </tr>
           <tr>
+            <td><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/QuotaExceededException.html">QuotaExceededException</a></code></td>
+            <td>
+              <p>The request has hit a quota limit.</p>
+            </td>
+          </tr>
+          <tr>
             <td><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/RequestTimeoutException.html">RequestTimeoutException</a></code></td>
             <td>
               <p>A request took too long to complete.</p>
--- /home/runner/diff/original/firebase-kotlindoc/kotlin/client/firebase-vertexai/_toc.yaml	2025-03-13 17:20:36.257688209 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/client/firebase-vertexai/_toc.yaml	2025-03-13 17:18:26.321883058 +0000
@@ -148,6 +148,8 @@
       path: "/docs/reference/kotlin/com/google/firebase/vertexai/type/InvalidStateException.html"
     - title: "PromptBlockedException"
       path: "/docs/reference/kotlin/com/google/firebase/vertexai/type/PromptBlockedException.html"
+    - title: "QuotaExceededException"
+      path: "/docs/reference/kotlin/com/google/firebase/vertexai/type/QuotaExceededException.html"
     - title: "RequestTimeoutException"
       path: "/docs/reference/kotlin/com/google/firebase/vertexai/type/RequestTimeoutException.html"
     - title: "ResponseStoppedException"
--- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/FirebaseVertexAIException.html	2025-03-13 17:20:36.259688222 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/FirebaseVertexAIException.html	2025-03-13 17:18:26.324883077 +0000
@@ -42,7 +42,7 @@
       </table>
     </div>
     <div class="devsite-table-wrapper"><devsite-expandable><span class="expand-control jd-sumtable-subclasses">Known direct subclasses
-        <div class="showalways" id="subclasses-direct"><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentBlockedException.html">ContentBlockedException</a>, <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/InvalidAPIKeyException.html">InvalidAPIKeyException</a>, <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/InvalidLocationException.html">InvalidLocationException</a>, <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/InvalidStateException.html">InvalidStateException</a>, <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/PromptBlockedException.html">PromptBlockedException</a>, <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/RequestTimeoutException.html">RequestTimeoutException</a>, <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/ResponseStoppedException.html">ResponseStoppedException</a>, <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/SerializationException.html">SerializationException</a>, <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/ServerException.html">ServerException</a>, <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/ServiceDisabledException.html">ServiceDisabledException</a>, <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/UnknownException.html">UnknownException</a>, <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/UnsupportedUserLocationException.html">UnsupportedUserLocationException</a></div>
+        <div class="showalways" id="subclasses-direct"><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentBlockedException.html">ContentBlockedException</a>, <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/InvalidAPIKeyException.html">InvalidAPIKeyException</a>, <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/InvalidLocationException.html">InvalidLocationException</a>, <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/InvalidStateException.html">InvalidStateException</a>, <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/PromptBlockedException.html">PromptBlockedException</a>, <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/QuotaExceededException.html">QuotaExceededException</a>, <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/RequestTimeoutException.html">RequestTimeoutException</a>, <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/ResponseStoppedException.html">ResponseStoppedException</a>, <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/SerializationException.html">SerializationException</a>, <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/ServerException.html">ServerException</a>, <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/ServiceDisabledException.html">ServiceDisabledException</a>, <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/UnknownException.html">UnknownException</a>, <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/UnsupportedUserLocationException.html">UnsupportedUserLocationException</a></div>
       </span>
       <div id="subclasses-direct-summary">
         <div class="devsite-table-wrapper">
@@ -81,6 +81,12 @@
                 </td>
               </tr>
               <tr>
+                <td><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/QuotaExceededException.html">QuotaExceededException</a></code></td>
+                <td>
+                  <p>The request has hit a quota limit.</p>
+                </td>
+              </tr>
+              <tr>
                 <td><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/RequestTimeoutException.html">RequestTimeoutException</a></code></td>
                 <td>
                   <p>A request took too long to complete.</p>
--- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/QuotaExceededException.html	1970-01-01 00:00:00.000000000 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/QuotaExceededException.html	2025-03-13 17:18:26.325883083 +0000
@@ -0,0 +1,179 @@
+<html devsite="true">
+  <head>
+    <title>QuotaExceededException</title>
+{% setvar book_path %}/_book.yaml{% endsetvar %}
+{% include "docs/reference/kotlin/_reference-head-tags.html" %}
+  </head>
+  <body>
+    <div id="metadata-info-block"></div>
+    <h1>QuotaExceededException</h1>
+    <p>
+      <pre>class <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/QuotaExceededException.html">QuotaExceededException</a> : <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FirebaseVertexAIException.html">FirebaseVertexAIException</a></pre>
+    </p>
+    <div class="devsite-table-wrapper">
+      <table class="jd-inheritance-table">
+        <tbody>
+          <tr>
+            <td colspan="6"><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">kotlin.Any</a></td>
+          </tr>
+          <tr>
+            <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;↳</td>
+            <td colspan="5"><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html">kotlin.Throwable</a></td>
+          </tr>
+          <tr>
+            <td>&nbsp;</td>
+            <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;↳</td>
+            <td colspan="4"><a href="https://developer.android.com/reference/kotlin/java/lang/Exception.html">java.lang.Exception</a></td>
+          </tr>
+          <tr>
+            <td>&nbsp;</td>
+            <td>&nbsp;</td>
+            <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;↳</td>
+            <td colspan="3"><a href="https://developer.android.com/reference/kotlin/java/lang/RuntimeException.html">java.lang.RuntimeException</a></td>
+          </tr>
+          <tr>
+            <td>&nbsp;</td>
+            <td>&nbsp;</td>
+            <td>&nbsp;</td>
+            <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;↳</td>
+            <td colspan="2"><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FirebaseVertexAIException.html">com.google.firebase.vertexai.type.FirebaseVertexAIException</a></td>
+          </tr>
+          <tr>
+            <td>&nbsp;</td>
+            <td>&nbsp;</td>
+            <td>&nbsp;</td>
+            <td>&nbsp;</td>
+            <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;↳</td>
+            <td colspan="1"><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/QuotaExceededException.html">com.google.firebase.vertexai.type.QuotaExceededException</a></td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <hr>
+    <p>The request has hit a quota limit. Learn more about quotas in the <a href="https://firebase.google.com/docs/vertex-ai/quotas">Firebase documentation.</a></p>
+    <h2>Summary</h2>
+    <div class="devsite-table-wrapper">
+      <table class="responsive" id="inhmethods">
+        <thead>
+          <tr>
+            <th colspan="100%"><h3>Inherited functions</h3></th>
+          </tr>
+        </thead>
+        <tbody class="list">
+          <tr>
+            <td><devsite-expandable><span class="expand-control">From <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html">kotlin.Throwable</a></span>
+              <div class="devsite-table-wrapper">
+                <table class="responsive">
+                  <colgroup>
+                    <col width="40%">
+                    <col>
+                  </colgroup>
+                  <tbody class="list">
+                    <tr>
+                      <td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
+                      <td>
+                        <div><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/add-suppressed.html">addSuppressed</a>(@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull.html">RecentlyNonNull</a> p0:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html">Throwable</a>)</code></div>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td><code>open <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html">Throwable</a></code></td>
+                      <td>
+                        <div><code>@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull.html">RecentlyNonNull</a><br><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/fill-in-stack-trace.html">fillInStackTrace</a>()</code></div>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td><code>open <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a></code></td>
+                      <td>
+                        <div><code>@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNullable.html">RecentlyNullable</a><br><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/get-localized-message.html">getLocalizedMessage</a>()</code></div>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td><code>open <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html">Array</a>&lt;<a href="https://developer.android.com/reference/kotlin/java/lang/StackTraceElement.html">StackTraceElement</a>&gt;</code></td>
+                      <td>
+                        <div><code>@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull.html">RecentlyNonNull</a><br><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/get-stack-trace.html">getStackTrace</a>()</code></div>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html">Array</a>&lt;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html">Throwable</a>&gt;</code></td>
+                      <td>
+                        <div><code>@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull.html">RecentlyNonNull</a><br><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/get-suppressed.html">getSuppressed</a>()</code></div>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td><code>open <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html">Throwable</a></code></td>
+                      <td>
+                        <div><code>@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull.html">RecentlyNonNull</a><br><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/init-cause.html">initCause</a>(@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNullable.html">RecentlyNullable</a> p0:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html">Throwable</a>)</code></div>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td><code>open <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
+                      <td>
+                        <div><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/print-stack-trace.html">printStackTrace</a>()</code></div>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td><code>open <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
+                      <td>
+                        <div><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/print-stack-trace.html">printStackTrace</a>(@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull.html">RecentlyNonNull</a> p0:&nbsp;<a href="https://developer.android.com/reference/kotlin/java/io/PrintStream.html">PrintStream</a>)</code></div>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td><code>open <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
+                      <td>
+                        <div><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/print-stack-trace.html">printStackTrace</a>(@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull.html">RecentlyNonNull</a> p0:&nbsp;<a href="https://developer.android.com/reference/kotlin/java/io/PrintWriter.html">PrintWriter</a>)</code></div>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td><code>open <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
+                      <td>
+                        <div><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/set-stack-trace.html">setStackTrace</a>(@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull.html">RecentlyNonNull</a> p0:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html">Array</a>&lt;<a href="https://developer.android.com/reference/kotlin/java/lang/StackTraceElement.html">StackTraceElement</a>&gt;)</code></div>
+                      </td>
+                    </tr>
+                  </tbody>
+                </table>
+              </div>
+</devsite-expandable>            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <div class="devsite-table-wrapper">
+      <table class="responsive" id="inhmethods">
+        <thead>
+          <tr>
+            <th colspan="100%"><h3>Inherited properties</h3></th>
+          </tr>
+        </thead>
+        <tbody class="list">
+          <tr>
+            <td><devsite-expandable><span class="expand-control">From <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html">kotlin.Throwable</a></span>
+              <div class="devsite-table-wrapper">
+                <table class="responsive">
+                  <colgroup>
+                    <col width="40%">
+                    <col>
+                  </colgroup>
+                  <tbody class="list">
+                    <tr>
+                      <td><code>open <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html">Throwable</a>?</code></td>
+                      <td>
+                        <div><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/cause.html">cause</a></code></div>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td><code>open <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>?</code></td>
+                      <td>
+                        <div><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/message.html">message</a></code></div>
+                      </td>
+                    </tr>
+                  </tbody>
+                </table>
+              </div>
+</devsite-expandable>            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+  </body>
+</html>
+
--- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/package-summary.html	2025-03-13 17:20:36.260688228 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/package-summary.html	2025-03-13 17:18:26.325883083 +0000
@@ -341,6 +341,12 @@
             </td>
           </tr>
           <tr>
+            <td><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/QuotaExceededException.html">QuotaExceededException</a></code></td>
+            <td>
+              <p>The request has hit a quota limit.</p>
+            </td>
+          </tr>
+          <tr>
             <td><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/RequestTimeoutException.html">RequestTimeoutException</a></code></td>
             <td>
               <p>A request took too long to complete.</p>

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Mar 12, 2025

Coverage Report 1

Affected Products

No changes between base commit (bdb330e) and merge commit (b6d99ad).

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/UoiOvQFsIj.html

@google-oss-bot
Copy link
Contributor

The public api surface has changed for the subproject firebase-vertexai:
error: Added class com.google.firebase.vertexai.type.QuotaExceededException [AddedClass]

Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly.

Copy link
Contributor

github-actions bot commented Mar 12, 2025

Test Results

 18 files   -  4   18 suites   - 4   12s ⏱️ ±0s
 85 tests  - 34   85 ✅  - 34  0 💤 ±0  0 ❌ ±0 
170 runs   - 68  170 ✅  - 68  0 💤 ±0  0 ❌ ±0 

Results for commit db8c49c. ± Comparison against base commit bdb330e.

This pull request removes 37 and adds 3 tests. Note that renamed tests count towards both.
com.google.firebase.vertexai.common.StreamingSnapshotTests ‑ citation parsed correctly
com.google.firebase.vertexai.common.StreamingSnapshotTests ‑ empty content
com.google.firebase.vertexai.common.StreamingSnapshotTests ‑ http errors
com.google.firebase.vertexai.common.StreamingSnapshotTests ‑ image rejected
com.google.firebase.vertexai.common.StreamingSnapshotTests ‑ invalid api key
com.google.firebase.vertexai.common.StreamingSnapshotTests ‑ long reply
com.google.firebase.vertexai.common.StreamingSnapshotTests ‑ prompt blocked for safety
com.google.firebase.vertexai.common.StreamingSnapshotTests ‑ quotes escaped
com.google.firebase.vertexai.common.StreamingSnapshotTests ‑ short reply
com.google.firebase.vertexai.common.StreamingSnapshotTests ‑ stopped for recitation
…
com.google.firebase.vertexai.UnarySnapshotTests ‑ function call has no arguments field
com.google.firebase.vertexai.UnarySnapshotTests ‑ long reply
com.google.firebase.vertexai.UnarySnapshotTests ‑ quota exceeded

♻️ This comment has been updated with latest results.

@google-oss-bot
Copy link
Contributor

The public api surface has changed for the subproject firebase-vertexai:
error: Added class com.google.firebase.vertexai.type.QuotaExceededException [AddedClass]

Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Mar 12, 2025

Size Report 1

Affected Products

  • firebase-vertexai

    TypeBase (bdb330e)Merge (b6d99ad)Diff
    aar578 kB579 kB+690 B (+0.1%)
    apk (aggressive)1.40 MB1.40 MB+216 B (+0.0%)
    apk (release)9.37 MB9.37 MB+352 B (+0.0%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/ucShYVROpl.html

Copy link
Member

@daymxn daymxn left a comment

Choose a reason for hiding this comment

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

You need to update the .api file and probably minor bump (?) but otherwise lgtm

@rlazo rlazo enabled auto-merge (squash) March 13, 2025 17:16
@rlazo rlazo merged commit 19dd95b into main Mar 13, 2025
31 checks passed
@rlazo rlazo deleted the rl.fix.vertex.tests branch March 13, 2025 17:21
tejasd pushed a commit that referenced this pull request Apr 1, 2025
There is an extra copy of some tests inside ` test/.../common`
directory. This change removes them, and in the process:

- Adds missing tests to the correct test file
- Gets rid of duplicated tests and test-util code
- Adds an exception type for quota exceeded
@firebase firebase locked and limited conversation to collaborators Apr 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants