Inbox answer validation isn't atomic with resolving the question

This commit is contained in:
Ian Gulliver
2026-10-16 14:30:50 -07:00
parent f9a5360c33
commit 9f9556b1e4
4 changed files with 20 additions and 8 deletions
+4
View File
@@ -2,6 +2,7 @@ package agents
import (
"context"
"errors"
"fmt"
"log/slog"
"slices"
@@ -61,6 +62,9 @@ func (m *Manager) Respond(ctx context.Context, user string, creates []api.InboxR
}
err := m.store.Respond(ctx, user, resolutions)
if errors.Is(err, store.ErrNotOpen) {
return nil, fmt.Errorf("%w: %w", ErrConflict, err)
}
if err != nil {
slog.Error("record inbox responses", "user", user, "err", err)
return nil, err