Add error handling to event creation
This commit is contained in:
parent
3ff04ec8d7
commit
5ccf65d89b
|
@ -4,6 +4,7 @@ import { eventDateId, eventDescriptionId, eventTimeId, eventTimeZoneId } from '.
|
|||
import { addTokenToMap, createLFGPost, getFinalActivity, idSeparator, pathIdxSeparator } from './utils.ts';
|
||||
import { Activities, Activity } from './activities.ts';
|
||||
import { getDateFromRawInput } from './dateTimeUtils.ts';
|
||||
import utils from '../../utils.ts';
|
||||
|
||||
export const customId = 'finalize';
|
||||
|
||||
|
@ -73,7 +74,7 @@ const execute = async (bot: Bot, interaction: Interaction) => {
|
|||
customIdIdxPath,
|
||||
true,
|
||||
),
|
||||
);
|
||||
).catch((e: Error) => utils.commonLoggers.interactionSendError('step2-finalize.ts', interaction, e));
|
||||
} else {
|
||||
somethingWentWrong(bot, interaction, 'noDataFromEventDescriptionModal');
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ const execute = async (bot: Bot, interaction: Interaction) => {
|
|||
// Let discord know we didn't ignore the user
|
||||
bot.helpers.sendInteractionResponse(interaction.id, interaction.token, {
|
||||
type: InteractionResponseTypes.DeferredUpdateMessage,
|
||||
});
|
||||
}).catch((e: Error) => utils.commonLoggers.interactionSendError('step3-createEvent.ts', interaction, e));
|
||||
} else {
|
||||
somethingWentWrong(bot, interaction, 'noDataFromFinalizeEventStep');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue