mirror of
https://github.com/openziti/zrok.git
synced 2025-06-23 03:01:54 +02:00
invite error handling (#67)
This commit is contained in:
parent
222a494dbf
commit
c739a2da69
@ -37,11 +37,14 @@ func (cmd *inviteCommand) run(_ *cobra.Command, _ []string) {
|
|||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
if confirm != email {
|
if confirm != email {
|
||||||
fmt.Println("entered emails do not match... aborting!")
|
showError("entered emails do not match... aborting!", nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
zrok, err := newZrokClient(apiEndpoint)
|
zrok, err := newZrokClient(apiEndpoint)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if !panicInstead {
|
||||||
|
showError("error creating zrok api client", err)
|
||||||
|
}
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
req := identity.NewCreateAccountParams()
|
req := identity.NewCreateAccountParams()
|
||||||
@ -50,6 +53,9 @@ func (cmd *inviteCommand) run(_ *cobra.Command, _ []string) {
|
|||||||
}
|
}
|
||||||
_, err = zrok.Identity.CreateAccount(req)
|
_, err = zrok.Identity.CreateAccount(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if !panicInstead {
|
||||||
|
showError("error creating account", err)
|
||||||
|
}
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user