Skip to content

Commit

Permalink
SASS-111190: Added logger statement to debug the R15 foreign property…
Browse files Browse the repository at this point in the history
… fetch failure (#147)
  • Loading branch information
vivekhmrc authored Feb 20, 2025
1 parent 8f2e32c commit a016c3a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion app/connectors/IntegrationFrameworkConnector.scala
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,17 @@ class IntegrationFrameworkConnector @Inject() (http: HttpClientV2, appConfig: Ap
.setHeader("Environment" -> appConfig.ifEnvironment)
.setHeader(HeaderNames.authorisation -> s"Bearer ${appConfig.authorisationTokenFor(apiVersion)}")
.execute[GetPeriodicSubmissionIdResponse]
.map(response => response.result)
.map { response =>
if (response.result.isLeft) {
val correlationId =
response.httpResponse.header(key = "CorrelationId").map(id => s" CorrelationId: $id").getOrElse("")
logger.error(
s"Error getting periodic submission ids from the Integration Framework: URL: $url" +
s" correlationId: $correlationId; status: ${response.httpResponse.status}; Body:${response.httpResponse.body}"
)
}
response.result
}

}

Expand Down

0 comments on commit a016c3a

Please sign in to comment.