Skip to content

Conversation

@hentrymartin
Copy link
Collaborator

What's in this PR?

  • Added timeout to prisma service

Ticket link - https://topcoder.atlassian.net/browse/PM-2539

USERFLOW: process.env.USERFLOW_PRIVATE_KEY
}
},
MEMBER_SERVICE_PRISMA_TIMEOUT: process.env.MEMBER_SERVICE_PRISMA_TIMEOUT ? parseInt(process.env.MEMBER_SERVICE_PRISMA_TIMEOUT, 10) : 10000,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[⚠️ correctness]
Consider adding validation to ensure process.env.MEMBER_SERVICE_PRISMA_TIMEOUT is a valid integer before parsing it with parseInt. This will prevent potential issues if the environment variable is set to a non-numeric value, which would result in NaN and default to 10000. You can use Number.isInteger() or similar checks for validation.


const clientOptions = {
transactionOptions: {
timeout: config.MEMBER_SERVICE_PRISMA_TIMEOUT,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ correctness]
Ensure that config.MEMBER_SERVICE_PRISMA_TIMEOUT is properly validated and has a sensible default value. If this value is undefined or set to an inappropriate value, it could lead to unexpected behavior in the transaction timeout.

@kkartunov kkartunov merged commit ea136c8 into develop Oct 28, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants