Skip to content

Commit

Permalink
Merge pull request #2811 from Opetushallitus/tor-xxxx-retry-digi-yo-t…
Browse files Browse the repository at this point in the history
…odistuksiin

TOR-xxxx: Uudelleenyritä POST-kutsuja digitodistus status-pyynnöissä
  • Loading branch information
AleksiAhtiainen authored Dec 11, 2023
2 parents 4f80a58 + 6163d03 commit 8b0f8d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/scala/fi/oph/koski/ytr/YtrClient.scala
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ case class RemoteYtrClient(rootUrl: String, user: String, password: String) exte

override def getCertificateStatus(req: YoTodistusHetuRequest): Either[HttpStatus, YtrCertificateResponse] = {
val uri = uri"/api/oph-koski/signed-certificate/status"
val json = runIO(http.post(uri, req)(json4sEncoderOf[YoTodistusHetuRequest])(Http.parseJson[JValue]))
val json = runIO(postRetryingHttp.post(uri, req)(json4sEncoderOf[YoTodistusHetuRequest])(Http.parseJson[JValue]))
val response = SchemaValidatingExtractor.extract[YtrCertificateResponse](json)
response.left.map(e => KoskiErrorCategory.badRequest.validation.jsonSchema(JsonErrorMessage(e)))
}
Expand Down

0 comments on commit 8b0f8d5

Please sign in to comment.