File tree 2 files changed +10
-7
lines changed
2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -231,7 +231,9 @@ describe('generateContent()', () => {
231
231
} as Response ) ;
232
232
await expect (
233
233
generateContent ( fakeApiSettings , 'model' , fakeRequestParams )
234
- ) . to . be . rejectedWith ( / f i r e b a s e v e r t e x a i \. g o o g l e a p i s .* m y - p r o j e c t / ) ;
234
+ ) . to . be . rejectedWith (
235
+ / f i r e b a s e v e r t e x a i \. g o o g l e a p i s [ \s \S ] * m y - p r o j e c t [ \s \S ] * a p i - n o t - e n a b l e d /
236
+ ) ;
235
237
expect ( mockFetch ) . to . be . called ;
236
238
} ) ;
237
239
} ) ;
Original file line number Diff line number Diff line change @@ -166,12 +166,13 @@ export async function makeRequest(
166
166
) {
167
167
throw new VertexAIError (
168
168
VertexAIErrorCode . API_NOT_ENABLED ,
169
- `The Vertex AI for Firebase SDK requires the Firebase Vertex AI API ` +
170
- `firebasevertexai.googleapis.com to be enabled for your ` +
171
- `project. Get started in the Firebase Console` +
172
- ` (https://console.firebase.google.com/project/${ url . apiSettings . project } /genai/vertex)` +
173
- ` or verify that the API is enabled in the Google Cloud` +
174
- ` Console (https://console.developers.google.com/apis/api/firebasevertexai.googleapis.com/overview?project=${ url . apiSettings . project } ).` ,
169
+ `The Vertex AI in Firebase SDK requires the Vertex AI in Firebase
170
+ API ('firebasevertexai.googleapis.com') to be enabled in your
171
+ Firebase project. Enable this API by visiting the Firebase Console
172
+ at https://console.firebase.google.com/project/${ url . apiSettings . project } /genai/
173
+ and clicking "Get started". If you enabled this API recently,
174
+ wait a few minutes for the action to propagate to our systems and
175
+ then retry.` ,
175
176
{
176
177
status : response . status ,
177
178
statusText : response . statusText ,
You can’t perform that action at this time.
0 commit comments