Skip to content

Commit

Permalink
return after notifying channel name exists (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpoile authored Apr 3, 2020
1 parent 4448314 commit 3d661c3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/api/incidents.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ func (h *IncidentHandler) createIncidentFromDialog(w http.ResponseWriter, r *htt

if errors.Is(err, incident.ErrChannelExists) {
h.poster.Ephemeral(request.UserId, request.ChannelId, "Error: A channel with the name `%v` already exists. Please choose a different name.", name)
w.WriteHeader(http.StatusOK)
return
} else if err != nil {
HandleError(w, err)
return
Expand Down

0 comments on commit 3d661c3

Please sign in to comment.