This PR fixes issue where CLI would error when origin cannot be reached.
This is mostly related to policy config synchronization and:
It makes sense to catch such errors for validate and config commands where we can fallback to local config.
The command will run fine. When --debug flag is provided it will additionally display warning with error message (if there is one). This is because it needs to be debug-able and users should be able to see the reason why local config was used as fallback.
For auth related commands the behavior is the same as before since without connecting to origin, those can't basically run. The only addition is that isAuthenticated check will not throw when origin cannot be reached, just return false - this makes the correct error to be shown while those commands fail.
This PR fixes issue where CLI would error when origin cannot be reached.
This is mostly related to policy config synchronization and:
validate
andconfig
commands where we can fallback to local config.--debug
flag is provided it will additionally display warning with error message (if there is one). This is because it needs to be debug-able and users should be able to see the reason why local config was used as fallback.isAuthenticated
check will not throw when origin cannot be reached, just return false - this makes the correct error to be shown while those commands fail.Changes
Fixes
Checklist