-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description

Reported on discord: https://discord.com/channels/688377338576109643/716611038950457393/1393758768994713621
Seems like the problem is here:
return _requests.SingleOrDefault(x => x.Sender == req.Sender && x.Receiver == req.Receiver); |
Using SingleOrDefault()
is the cause because it only returns successfully if there's zero or one results and failing if there's more. Using FirstOrDefault()
could allow recovering more gracefully. See https://stackoverflow.com/a/1256784/846934
Should probably use FirstOrDefault()
here and then immediately wipe out any other duplicates that aren't exactly that entry, I guess.
Metadata
Metadata
Assignees
Labels
No labels