noot
All checks were successful
commit-tag / commit-tag-image (map[context:./migrations file:./migrations/Dockerfile name:migrations]) (push) Successful in 16s
commit-tag / commit-tag-image (map[context:./ts file:./ts/Dockerfile name:ts]) (push) Successful in 47s

This commit is contained in:
a 2025-07-15 23:20:58 -05:00
parent 8dce848d3a
commit 5de260813b
No known key found for this signature in database
GPG Key ID: 2F22877AA4DFDADB

View File

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