refactor: return CataloggerError as Results instead of throwing in commands
This commit is contained in:
parent
84c3b42874
commit
8a4e3ff184
11 changed files with 57 additions and 36 deletions
|
|
@ -59,7 +59,7 @@ public class InviteCommands(
|
|||
var (userId, guildId) = contextInjection.GetUserAndGuild();
|
||||
var guildInvites = await guildApi.GetGuildInvitesAsync(guildId).GetOrThrow();
|
||||
if (!guildCache.TryGet(guildId, out var guild))
|
||||
throw new CataloggerError("Guild not in cache");
|
||||
return CataloggerError.Result("Guild not in cache");
|
||||
|
||||
var dbInvites = await inviteRepository.GetGuildInvitesAsync(guildId);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue