Cleanup error messages
This commit is contained in:
parent
17bee2852a
commit
81adf6bbca
|
@ -116,7 +116,7 @@ func loadEndpoints(c *client.Client, me *url.URL, filename string) error {
|
|||
}
|
||||
|
||||
if endpoints.MicrosubEndpoint == "" {
|
||||
return fmt.Errorf("Microsub Endpoint is missing")
|
||||
return fmt.Errorf("microsub endpoint is missing")
|
||||
}
|
||||
|
||||
u, err := url.Parse(endpoints.MicrosubEndpoint)
|
||||
|
|
|
@ -106,7 +106,7 @@ func newMainHandler(backend *memoryBackend) (*mainHandler, error) {
|
|||
|
||||
templateDir := os.Getenv("EKSTER_TEMPLATES")
|
||||
if templateDir == "" {
|
||||
return nil, fmt.Errorf("Missing env var EKSTER_TEMPLATES")
|
||||
return nil, fmt.Errorf("missing env var EKSTER_TEMPLATES")
|
||||
}
|
||||
|
||||
templateDir = strings.TrimRight(templateDir, "/")
|
||||
|
|
|
@ -242,7 +242,7 @@ func (b *memoryBackend) ChannelsUpdate(uid, name string) (microsub.Channel, erro
|
|||
return c, nil
|
||||
}
|
||||
|
||||
return microsub.Channel{}, fmt.Errorf("Channel %s does not exist", uid)
|
||||
return microsub.Channel{}, fmt.Errorf("channel %s does not exist", uid)
|
||||
}
|
||||
|
||||
// ChannelsDelete deletes a channel
|
||||
|
@ -568,14 +568,14 @@ func (b *memoryBackend) MarkRead(channel string, uids []string) error {
|
|||
args := redis.Args{}.Add(channelKey).AddFlat(itemUIDs)
|
||||
|
||||
if _, err := conn.Do("SADD", args...); err != nil {
|
||||
return fmt.Errorf("Marking read for channel %s has failed: %s", channel, err)
|
||||
return fmt.Errorf("marking read for channel %s has failed: %s", channel, err)
|
||||
}
|
||||
|
||||
zchannelKey := fmt.Sprintf("zchannel:%s:posts", channel)
|
||||
args = redis.Args{}.Add(zchannelKey).AddFlat(itemUIDs)
|
||||
|
||||
if _, err := conn.Do("ZREM", args...); err != nil {
|
||||
return fmt.Errorf("Marking read for channel %s has failed: %s", channel, err)
|
||||
return fmt.Errorf("marking read for channel %s has failed: %s", channel, err)
|
||||
}
|
||||
|
||||
err := b.updateChannelUnreadCount(conn, channel)
|
||||
|
|
Loading…
Reference in New Issue
Block a user