summaryrefslogtreecommitdiffstats
path: root/store
diff options
context:
space:
mode:
Diffstat (limited to 'store')
-rw-r--r--store/sql_channel_store.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/store/sql_channel_store.go b/store/sql_channel_store.go
index 7e90a6d27..a8474be80 100644
--- a/store/sql_channel_store.go
+++ b/store/sql_channel_store.go
@@ -6,6 +6,7 @@ package store
import (
"database/sql"
"fmt"
+ "net/http"
"strconv"
"strings"
@@ -223,7 +224,7 @@ func (s SqlChannelStore) saveChannelT(transaction *gorp.Transaction, channel *mo
if dupChannel.DeleteAt > 0 {
result.Err = model.NewLocAppError("SqlChannelStore.Save", "store.sql_channel.save_channel.previously.app_error", nil, "id="+channel.Id+", "+err.Error())
} else {
- result.Err = model.NewLocAppError("SqlChannelStore.Save", CHANNEL_EXISTS_ERROR, nil, "id="+channel.Id+", "+err.Error())
+ result.Err = model.NewAppError("SqlChannelStore.Save", CHANNEL_EXISTS_ERROR, nil, "id="+channel.Id+", "+err.Error(), http.StatusBadRequest)
result.Data = &dupChannel
}
} else {
@@ -427,7 +428,7 @@ func (s SqlChannelStore) GetChannels(teamId string, userId string) StoreChannel
result.Err = model.NewLocAppError("SqlChannelStore.GetChannels", "store.sql_channel.get_channels.get.app_error", nil, "teamId="+teamId+", userId="+userId+", err="+err.Error())
} else {
if len(*data) == 0 {
- result.Err = model.NewLocAppError("SqlChannelStore.GetChannels", "store.sql_channel.get_channels.not_found.app_error", nil, "teamId="+teamId+", userId="+userId)
+ result.Err = model.NewAppError("SqlChannelStore.GetChannels", "store.sql_channel.get_channels.not_found.app_error", nil, "teamId="+teamId+", userId="+userId, http.StatusBadRequest)
} else {
result.Data = data
}