diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-03-13 10:40:43 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-13 10:40:43 -0400 |
commit | 19c67d7fe35f92ae8a288dcdb9877d3bede41a61 (patch) | |
tree | 1119f74c30564ce53d5e7dc566009594e348f494 /store/sql_channel_store.go | |
parent | 3ebfb369530e28ca3246c5cd2833e666edce9c90 (diff) | |
download | chat-19c67d7fe35f92ae8a288dcdb9877d3bede41a61.tar.gz chat-19c67d7fe35f92ae8a288dcdb9877d3bede41a61.tar.bz2 chat-19c67d7fe35f92ae8a288dcdb9877d3bede41a61.zip |
Implement GET and POST /hooks/outgoing endpoints for APIv4 (#5645)
Diffstat (limited to 'store/sql_channel_store.go')
-rw-r--r-- | store/sql_channel_store.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/store/sql_channel_store.go b/store/sql_channel_store.go index 0ee6ae308..a85bb0656 100644 --- a/store/sql_channel_store.go +++ b/store/sql_channel_store.go @@ -386,9 +386,9 @@ func (s SqlChannelStore) get(id string, master bool, allowFromCache bool) StoreC } if obj, err := db.Get(model.Channel{}, id); err != nil { - result.Err = model.NewLocAppError("SqlChannelStore.Get", "store.sql_channel.get.find.app_error", nil, "id="+id+", "+err.Error()) + result.Err = model.NewAppError("SqlChannelStore.Get", "store.sql_channel.get.find.app_error", nil, "id="+id+", "+err.Error(), http.StatusInternalServerError) } else if obj == nil { - result.Err = model.NewAppError("SqlChannelStore.Get", "store.sql_channel.get.existing.app_error", nil, "id="+id, http.StatusBadRequest) + result.Err = model.NewAppError("SqlChannelStore.Get", "store.sql_channel.get.existing.app_error", nil, "id="+id, http.StatusNotFound) } else { result.Data = obj.(*model.Channel) channelCache.AddWithExpiresInSecs(id, obj.(*model.Channel), CHANNEL_CACHE_SEC) |