mirror of
https://github.com/elyby/chrly.git
synced 2024-11-30 02:32:19 +05:30
Возвращаем ошибку, если не удалось раскодировать JSON с информацией о скине из Redis
This commit is contained in:
parent
378643623b
commit
20b8e8da86
@ -114,15 +114,13 @@ func (db *redisDb) FindByUsername(username string) (*model.Skin, error) {
|
||||
|
||||
result, err := zlibDecode(encodedResult)
|
||||
if err != nil {
|
||||
log.Println("Cannot uncompress zlib for key " + redisKey) // TODO: replace with valid error
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var skin *model.Skin
|
||||
err = json.Unmarshal(result, &skin)
|
||||
if err != nil {
|
||||
log.Println("Cannot decode record data for key" + redisKey) // TODO: replace with valid error
|
||||
return nil, nil
|
||||
return nil, err
|
||||
}
|
||||
|
||||
skin.OldUsername = skin.Username
|
||||
|
Loading…
Reference in New Issue
Block a user