Description
When running deploy of functions to a Google Cloud Project that doesn't have Firebase added you get a very unspecific 403 error. It would be nice to fail with something a bit more user friendly like "Error: Cannot deploy to project as it doesn't support Firebase. You can add Firebase support to this project in the Firebase Console."
Repro steps
- Create a new project in Google Cloud Console
- Enable billing
- In a terminal, create a folder and initialize:
firebase init functions
- Try to deploy:
`firebase deploy --only functions --project
Expected result: Deployment succeeds, or a nice error is shown
Actual result: A hard to understand 403 error:
=== Deploying to 'test1-493612'...
i deploying functions
i functions: preparing codebase default for deployment
i functions: ensuring required API cloudfunctions.googleapis.com is enabled...
i functions: ensuring required API cloudbuild.googleapis.com is enabled...
i artifactregistry: ensuring required API artifactregistry.googleapis.com is enabled...
⚠ functions: missing required API cloudbuild.googleapis.com. Enabling now...
⚠ functions: missing required API cloudfunctions.googleapis.com. Enabling now...
✔ artifactregistry: required API artifactregistry.googleapis.com is enabled
Error: Request to https://firebase.googleapis.com/v1beta1/projects/test1-493612/adminSdkConfig had HTTP Error: 404, Requested entity was not found.
I propose we at least update the error message to be easier to read, e.g.:
"Error: Cannot deploy to project as it doesn't support Firebase. You can add Firebase support to this project in the Firebase Console."
Description
When running deploy of functions to a Google Cloud Project that doesn't have Firebase added you get a very unspecific 403 error. It would be nice to fail with something a bit more user friendly like "Error: Cannot deploy to project as it doesn't support Firebase. You can add Firebase support to this project in the Firebase Console."
Repro steps
firebase init functions`firebase deploy --only functions --project
Expected result: Deployment succeeds, or a nice error is shown
Actual result: A hard to understand 403 error:
I propose we at least update the error message to be easier to read, e.g.:
"Error: Cannot deploy to project as it doesn't support Firebase. You can add Firebase support to this project in the Firebase Console."