Skip to content

Conversation

@MarieseMikely
Copy link
Contributor

@MarieseMikely MarieseMikely commented Jan 13, 2026

Proposed changes

What changed

  • Added custom timeout exception class to handle timeout implementation
  • Configured HTTPConduit found here within the IdentityIQWebServiceSoapCache get method with 28 seconds so that if timeout occurs it can be caught in the getQuestions and submitAnswer method.
  • Changed the method of the responses from private to protected so that it can be used for unit tests
  • Added try-catch method so that when request is sent and we’re waiting for the response, if it hits the timeoutException, a new timeout metric will be sent to CW and error logs will be displayed, if it hits any other exception the error handling should continue as is, or successful should continue as normal.
  • Added timeout scenario to the integration tests based on the newly created scenario.
  • Updated timeout handling within the question and questionAnswer lambdas

Why did it change

Occasionally the Question and Answer lambdas time out due to the question and answer requests to Experian taking >29 seconds. This means the error is not actually handled as the lambda errors/fails.

Issue tracking

Checklists

Environment variables or secrets

  • No environment variables or secrets were added or changed

Other considerations

  • Update README with any new instructions or tasks

@MarieseMikely MarieseMikely changed the title Oj 3546 OJ-3546: Update Experian Response Timeouts Jan 13, 2026

public class KBVGateway {
private static final Logger LOGGER = LogManager.getLogger();
private static final int RESPONSE_TIMEOUT = 24000;
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we do more than 24 seconds?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, the reason why I set it to 24s was because of this "this will need to be set to slightly less than 25-28 seconds" in the ticket - should it be 25s or over?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh ok, lets go with 28 seconds actually. We can reduce it if we still see lambda timeouts.

} catch (Exception e) {
LOGGER.error("Question retrieval to the third party API threw an exception", e);
metricsService.sendErrorMetric(EXPERIAN_INITIAL_QUESTION_ERROR, "EXCEPTION");
return null;
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to clarify, what happens if null is returned here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When going back to the Question handler null will be the response in either the getQuestions here: return this.kbvService.getQuestions(identityIQWebServiceSoap, questionRequest); which should end up going to this throw new QuestionNotFoundException("No questions available"); since null is returned

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've updated it now to throw the timeout at the start if the questionResponse is null, rather than going through the lambda to another error message.

IdentityIQWebServiceSoap identityIQWebServiceSoap, SAARequest saaRequest) {
return identityIQWebServiceSoap.saa(saaRequest);

implementTimeout(identityIQWebServiceSoap);
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@MarieseMikely MarieseMikely Jan 16, 2026

Choose a reason for hiding this comment

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

This does the retrieval from the soap service, so I guess I can add the timeout implementation in the IdentityIQWebServiceSoapCache file preventing me from adding this implementTimeout method to two places (both the getQuestions and submitAnswers).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've moved the method and updated the unit tests for the IdentityIQWebServiceSoapCache file

@sonarqubecloud
Copy link

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