File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
internal/cmd/logs/access_token Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,10 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
7070 req := buildRequest (ctx , model , apiClient )
7171 items , err := req .Execute ()
7272 if err != nil {
73- return fmt .Errorf ("delete access token: %w" , err )
73+ return fmt .Errorf ("delete all access token: %w" , err )
74+ }
75+ if items == nil {
76+ return fmt .Errorf ("delete all access token: nil result" )
7477 }
7578
7679 params .Printer .Outputf ("Deleted %d access token(s)\n " , len (utils .PtrValue (items .Tokens )))
Original file line number Diff line number Diff line change @@ -70,7 +70,10 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
7070 req := buildRequest (ctx , model , apiClient )
7171 items , err := req .Execute ()
7272 if err != nil {
73- return fmt .Errorf ("delete access token: %w" , err )
73+ return fmt .Errorf ("delete all expired access token: %w" , err )
74+ }
75+ if items == nil {
76+ return fmt .Errorf ("delete all expired access token: nil result" )
7477 }
7578
7679 params .Printer .Outputf ("Deleted %d expired access token(s)\n " , len (utils .PtrValue (items .Tokens )))
You can’t perform that action at this time.
0 commit comments