Skip to content

fix(PM-2539): added timeout for prisma client#5

Merged
kkartunov merged 1 commit intodevelopfrom
pm-2539
Oct 28, 2025
Merged

fix(PM-2539): added timeout for prisma client#5
kkartunov merged 1 commit intodevelopfrom
pm-2539

Conversation

@hentrymartin
Copy link
Collaborator

What's in this PR?

  • added timeout for prisma client

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

inviteEmailSubject: process.env.INVITE_EMAIL_SUBJECT || 'You are invited to Topcoder',
inviteEmailSectionTitle: process.env.INVITE_EMAIL_SECTION_TITLE || 'Project Invitation',
SSO_REFCODES: process.env.SSO_REFCODES || '[]',
PROJECT_SERVICE_PRISMA_TIMEOUT: process.env.PROJECT_SERVICE_PRISMA_TIMEOUT ? parseInt(process.env.PROJECT_SERVICE_PRISMA_TIMEOUT) : 10000

Choose a reason for hiding this comment

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

[⚠️ correctness]
Consider using Number() instead of parseInt() for parsing PROJECT_SERVICE_PRISMA_TIMEOUT. parseInt() can produce unexpected results if the environment variable contains non-numeric characters, whereas Number() will return NaN in such cases, which might be safer for ensuring the timeout is a valid number.

constructor() {
super({
transactionOptions: {
timeout: AppConfig.PROJECT_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 AppConfig.PROJECT_SERVICE_PRISMA_TIMEOUT is validated and has a sensible default value to prevent potential runtime errors or unintended behavior if the configuration is missing or incorrect.

@kkartunov kkartunov merged commit 9891cca into develop Oct 28, 2025
1 check 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.

2 participants