Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pkg/repository/kvs.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,12 @@ func (r *kvsRepository) delete(ctx context.Context, key string) error {
func (r *kvsRepository) update(ctx context.Context, key string, value any) error {
return r.db.Update(func(tx *bbolt.Tx) error {
bucket := tx.Bucket([]byte(r.bucketName))
if bucket.Get([]byte(key)) == nil {
return fosite.ErrNotFound
}
data, err := json.Marshal(value)
if err != nil {
return fosite.ErrNotFound
return fmt.Errorf("failed to marshal value: %w", err)
Copy link

Copilot AI Aug 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing import for fmt package. The code uses fmt.Errorf but there's no visible import statement for the fmt package in the diff context.

Copilot uses AI. Check for mistakes.
}
return bucket.Put([]byte(key), data)
})
Expand Down