Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve error message when given invalid hosting configuration. (#5533)
Given invalid hosting configuration, Firebase CLI fails in an unhelpful way. e.g. ``` { "hosting": { "public": "public", "rewrites": [ { // missing "destination", "function", or "run" "source": "**" } ] } } ``` **Before**: ``` $ firebase deploy --only hosting ... Error: An unexpected error has occurred. $ firebase deploy --only hosting --debug ... Error: Never has a value ([object Object]). This should be impossible ``` **After** ``` $ firebase deploy --only hosting ... Error: Invalid hosting rewrite config in firebase.json. A rewrite config must specify 'destination', 'function', 'dynamicLinks', or 'run' ``` Fixes https://groups.google.com/a/google.com/g/firebase-discuss/c/VoQ0XkNnZFs
- Loading branch information