Skip to content

Conversation

@hentrymartin
Copy link
Collaborator

@hentrymartin hentrymartin commented Oct 23, 2025

What's in this PR?

  • Added timeout for Prisma service

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

constructor() {
super({
transactionOptions: {
timeout: process.env.IDENTITY_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]
Using process.env.IDENTITY_SERVICE_PRISMA_TIMEOUT directly in the constructor might lead to issues if the environment variable is not set or is set to a non-numeric value. Consider validating the environment variable and providing a fallback mechanism to ensure the timeout is always a valid number.

super({
transactionOptions: {
timeout: process.env.IDENTITY_SERVICE_PRISMA_TIMEOUT
? parseInt(process.env.IDENTITY_SERVICE_PRISMA_TIMEOUT, 10)

Choose a reason for hiding this comment

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

[❗❗ correctness]
Consider validating the environment variable process.env.IDENTITY_SERVICE_PRISMA_TIMEOUT before parsing it with parseInt. If the value is not a valid number, parseInt will return NaN, which could lead to unexpected behavior. You might want to add a check to ensure the parsed value is a valid number.

@kkartunov kkartunov merged commit f78c99e 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