Skip to content

Commit

Permalink
OY-4717 debug-lokitusta
Browse files Browse the repository at this point in the history
  • Loading branch information
marjakari committed Dec 31, 2024
1 parent 6970de9 commit e8e040c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ trait OppijanumerorekisteriComponent {
}
val result = future.map {
case r if r.getStatusCode == 200 =>
logger.info(s"oppijanumerorekisteri response ${r.getResponseBody}")
parse(r.getResponseBodyAsStream()).extract[Henkilo]
case r =>
throw new RuntimeException(new RuntimeException(s"Failed to get henkilö for $personOid: ${r.toString()}"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,15 @@ trait ApplicationsServletContainer {
val oid = personOid()
hakemusEditori.fetchByPersonOid(request, oid, Fetch) match {
case FullSuccess(hakemukset) =>
logger.info("ApplicationsServlet get FullSuccess")
Map(
"allApplicationsFetched" -> true,
"applications" -> hakemukset,
"migriJwt" -> migriJwt.createMigriJWT(oid),
"migriUrl" -> appConfig.settings.migriUrl
)
case PartialSuccess(hakemukset, exceptions) =>
logger.info("ApplicationsServlet get PartialSuccess")
exceptions.foreach(logger.warn(s"Failed to fetch all applications for oid $oid",_))
Map(
"allApplicationsFetched" -> false,
Expand All @@ -72,6 +74,7 @@ trait ApplicationsServletContainer {
"migriUrl" -> appConfig.settings.migriUrl
)
case FullFailure(exceptions) =>
logger.info("ApplicationsServlet get FullFailure")
exceptions.foreach(logger.error(s"Failed to fetch applications for oid $oid", _))
throw exceptions.head
}
Expand Down

0 comments on commit e8e040c

Please sign in to comment.