Skip to content

Commit a8bfebd

Browse files
fix(vertexai): fix the url in the service not available error (#13547)
* fix the url in the service not available error * Update packages/firebase_vertexai/firebase_vertexai/lib/src/error.dart Co-authored-by: Nate Bosch <[email protected]> --------- Co-authored-by: Nate Bosch <[email protected]>
1 parent 07eb25f commit a8bfebd

File tree

1 file changed

+5
-1
lines changed
  • packages/firebase_vertexai/firebase_vertexai/lib/src

1 file changed

+5
-1
lines changed

packages/firebase_vertexai/firebase_vertexai/lib/src/error.dart

+5-1
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,16 @@ final class ServiceApiNotEnabled implements VertexAIException {
5656
'The Vertex AI in Firebase SDK requires the Vertex AI in Firebase API '
5757
'(`firebasevertexai.googleapis.com`) to be enabled in your Firebase project. Enable this API '
5858
'by visiting the Firebase Console at '
59-
'https://console.firebase.google.com/$_projectId/genai '
59+
'https://console.firebase.google.com/project/$_id/genai '
6060
'and clicking "Get started". If you enabled this API recently, wait a few minutes for the '
6161
'action to propagate to our systems and then retry.';
6262

6363
@override
6464
String toString() => message;
65+
66+
String get _id {
67+
return _projectId.replaceAll('projects/', '');
68+
}
6569
}
6670

6771
/// Exception thrown when the quota is exceeded.

0 commit comments

Comments
 (0)