diff --git a/packages/firebase_vertexai/firebase_vertexai/lib/src/error.dart b/packages/firebase_vertexai/firebase_vertexai/lib/src/error.dart index 99adc850effc..c13a434d7610 100644 --- a/packages/firebase_vertexai/firebase_vertexai/lib/src/error.dart +++ b/packages/firebase_vertexai/firebase_vertexai/lib/src/error.dart @@ -56,12 +56,16 @@ final class ServiceApiNotEnabled implements VertexAIException { 'The Vertex AI in Firebase SDK requires the Vertex AI in Firebase API ' '(`firebasevertexai.googleapis.com`) to be enabled in your Firebase project. Enable this API ' 'by visiting the Firebase Console at ' - 'https://console.firebase.google.com/$_projectId/genai ' + 'https://console.firebase.google.com/project/$_id/genai ' 'and clicking "Get started". If you enabled this API recently, wait a few minutes for the ' 'action to propagate to our systems and then retry.'; @override String toString() => message; + + String get _id { + return _projectId.replaceAll('projects/', ''); + } } /// Exception thrown when the quota is exceeded.