Skip to content

Comments

Improved Kount Job error handling#5

Open
okater wants to merge 1 commit intoKount:masterfrom
okater:feature/kount-job-error-handling
Open

Improved Kount Job error handling#5
okater wants to merge 1 commit intoKount:masterfrom
okater:feature/kount-job-error-handling

Conversation

@okater
Copy link

@okater okater commented Sep 24, 2025

We had cases in Production when error handling did not work correctly because of possible Exception error.

Changes

  • In processENSEvent function if order does not exist order.custom.kount_ENSF = true will trigger an Exception which will not be handled by try/catch block and the Job will fail without any useful logs about the reason. Added null check condition to cover this case
  • Added siteID to the logs for better understanding which order (from which Site) triggered it
  • renamed e in catch to error since e already used in the upper try/catch block and it creates collision

This fix applied and tested in the real project in Production

- In processENSEvent function if order does not exist order.custom.kount_ENSF = true will trigger an Exception which will not be handled by try/catch block. Added null check condition
- Added siteID to the logs for better understanding which order (from which Site) triggered it
- renamed e in catch to error since e already used in the upper try/catch block
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.

1 participant