diff --git a/src/main/kotlin/net/leanix/githubagent/services/GitHubEnterpriseService.kt b/src/main/kotlin/net/leanix/githubagent/services/GitHubEnterpriseService.kt index 9bc0990..236ab8c 100644 --- a/src/main/kotlin/net/leanix/githubagent/services/GitHubEnterpriseService.kt +++ b/src/main/kotlin/net/leanix/githubagent/services/GitHubEnterpriseService.kt @@ -27,8 +27,8 @@ class GitHubEnterpriseService( }.onFailure { when (it) { is GitHubAppInsufficientPermissionsException -> { - syncLogService.sendErrorLog(it.message!!) logger.error(it.message) + syncLogService.sendErrorLog(it.message!!) } else -> { logger.error("Failed to verify JWT token", it) diff --git a/src/test/kotlin/net/leanix/githubagent/services/GitHubScanningServiceTest.kt b/src/test/kotlin/net/leanix/githubagent/services/GitHubScanningServiceTest.kt index 5a8097c..df1a420 100644 --- a/src/test/kotlin/net/leanix/githubagent/services/GitHubScanningServiceTest.kt +++ b/src/test/kotlin/net/leanix/githubagent/services/GitHubScanningServiceTest.kt @@ -243,9 +243,13 @@ class GitHubScanningServiceTest { ) gitHubScanningService.scanGitHubResources() verify { webSocketService.sendMessage(eq("$runId/organizations"), any()) } - verify { syncLogService.sendErrorLog("Failed to scan organization testInstallation1. Installation missing " + - "the following permissions: [administration, contents, metadata], " + - "and the following events: [label, public, repository, push]") } + verify { + syncLogService.sendErrorLog( + "Failed to scan organization testInstallation1. Installation missing " + + "the following permissions: [administration, contents, metadata], " + + "and the following events: [label, public, repository, push]" + ) + } verify { syncLogService.sendInfoLog("Finished initial full scan for organization testInstallation2.") } verify { syncLogService.sendInfoLog("Finished initial full scan for organization testInstallation2.") } }