noot
This commit is contained in:
parent
8dce848d3a
commit
5de260813b
@ -44,34 +44,34 @@ export const reply_to_interaction = async (props: {
|
||||
if (error.status === 404 || error.code === 10062) {
|
||||
// 10062 is Discord's "Unknown interaction" error code
|
||||
log.warn(
|
||||
{
|
||||
interactionId: ref.id,
|
||||
{
|
||||
interactionId: ref.id,
|
||||
error: error.message,
|
||||
code: error.code,
|
||||
status: error.status
|
||||
status: error.status
|
||||
},
|
||||
'Discord interaction expired (404) - not retrying'
|
||||
)
|
||||
|
||||
|
||||
// Throw non-retryable error to prevent Temporal from retrying
|
||||
throw ApplicationFailure.nonRetryable(
|
||||
`Discord interaction ${ref.id} has expired and cannot be responded to`,
|
||||
'DiscordInteractionExpired'
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
// Log other errors and re-throw them (these will be retried by Temporal)
|
||||
log.error(
|
||||
{
|
||||
interactionId: ref.id,
|
||||
{
|
||||
interactionId: ref.id,
|
||||
error: error.message,
|
||||
stack: error.stack,
|
||||
code: error.code,
|
||||
status: error.status
|
||||
status: error.status
|
||||
},
|
||||
'Failed to reply to Discord interaction'
|
||||
)
|
||||
|
||||
|
||||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user