We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5033f35 commit 1cb5defCopy full SHA for 1cb5def
src/commands/auth/sfdxurl/store.ts
@@ -63,7 +63,17 @@ export default class Store extends SfdxCommand {
63
? await this.getUrlFromJson(authFile)
64
: await fs.readFile(authFile, 'utf8');
65
66
- const oauth2Options = AuthInfo.parseSfdxAuthUrl(sfdxAuthUrl);
+ let oauth2Options: AuthFields;
67
+ try {
68
+ oauth2Options = AuthInfo.parseSfdxAuthUrl(sfdxAuthUrl);
69
+ } catch (e) {
70
+ this.ux.error(
71
+ `Error getting the auth URL from file ${authFile}. Please ensure it meets the description shown in the documentation for this command.`
72
+ );
73
+ this.ux.error(this.statics.description);
74
+ return;
75
+ }
76
+
77
const authInfo = await AuthInfo.create({ oauth2Options });
78
await authInfo.save();
79
0 commit comments