Skip to content

Commit

Permalink
Merge pull request #303 from mild-blue/stack-overflow
Browse files Browse the repository at this point in the history
Wrap exception that produces stack overflow
  • Loading branch information
LukasForst committed Jun 10, 2021
2 parents 90edca3 + 3a5f984 commit a42942c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ class IsinValidationService(
logger.info { "Data retrieval from ISIN - success." }
}.onFailure {
logger.warn { "Data retrieval from ISIN - failure." }
// TODO we think that this is the place which produces stack overflow
logger.error(it) {
// TODO #287 we think that this is the place which produces stack overflow
val wrappingException =
Exception("An exception ${it.javaClass.canonicalName} was thrown! - ${it.message}\n${it.stackTraceToString()}")
logger.error(wrappingException) {
"Getting data from ISIN server failed for patient ${firstName}/${lastName}/${personalNumber}"
}
}.getOrNull() ?: return IsinValidationResultDto(status = PatientValidationResult.WAS_NOT_VERIFIED)
Expand Down

0 comments on commit a42942c

Please sign in to comment.