better error handling
This commit is contained in:
@@ -73,7 +73,7 @@ func (c *Client) CreateShare(ctx context.Context, key string) (*types.Share, err
|
||||
}
|
||||
|
||||
if !exists {
|
||||
return nil, errors.New("key does not exist")
|
||||
return nil, types.ErrKeyNotFound
|
||||
}
|
||||
|
||||
err = c.db.CreateShare(ctx, share)
|
||||
|
||||
Reference in New Issue
Block a user