Skip to content

Commit

Permalink
Posting response when there are no Todos to pop instead of unk error (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dantepippi authored Jul 29, 2020
1 parent 0e146a1 commit ffa4359
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@ func (p *Plugin) runListCommand(args []string, extra *model.CommandArgs) (bool,
func (p *Plugin) runPopCommand(args []string, extra *model.CommandArgs) (bool, error) {
issue, foreignID, err := p.listManager.PopIssue(extra.UserId)
if err != nil {
if err.Error() == "cannot find issue" {
p.postCommandResponse(extra, "There are no Todos to pop.")
return false, nil
}
return false, err
}

Expand Down

0 comments on commit ffa4359

Please sign in to comment.