Inbox answer validation isn't atomic with resolving the question
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user