diff options
author | 2023-10-05 22:23:29 -0700 | |
---|---|---|
committer | 2023-10-06 13:52:33 -0700 | |
commit | 2002d60fbe0cbc0b74bfcc29305d018db1564d3c (patch) | |
tree | e51d3b24697dadc2fb96e45556ba9b5666a16d35 /internal/storage/icon.go | |
parent | 5774323f2ef646bea3e078a8bee382ea45a7e276 (diff) | |
download | v2-2002d60fbe0cbc0b74bfcc29305d018db1564d3c.tar.gz v2-2002d60fbe0cbc0b74bfcc29305d018db1564d3c.tar.zst v2-2002d60fbe0cbc0b74bfcc29305d018db1564d3c.zip |
Add new API endpoint /icons/{iconID}
Diffstat (limited to 'internal/storage/icon.go')
-rw-r--r-- | internal/storage/icon.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/storage/icon.go b/internal/storage/icon.go index dc04f657..bd407d92 100644 --- a/internal/storage/icon.go +++ b/internal/storage/icon.go @@ -27,7 +27,7 @@ func (s *Storage) IconByID(iconID int64) (*model.Icon, error) { if err == sql.ErrNoRows { return nil, nil } else if err != nil { - return nil, fmt.Errorf("store: unable to fetch icon by hash: %v", err) + return nil, fmt.Errorf("store: unable to fetch icon #%d: %w", iconID, err) } return &icon, nil @@ -63,7 +63,7 @@ func (s *Storage) IconByHash(icon *model.Icon) error { if err == sql.ErrNoRows { return nil } else if err != nil { - return fmt.Errorf(`store: unable to fetch icon by hash: %v`, err) + return fmt.Errorf(`store: unable to fetch icon by hash %q: %v`, icon.Hash, err) } return nil |