1
0
mirror of https://github.com/pcvolkmer/etl-processor.git synced 2025-04-20 01:36:50 +00:00

Use Map as status body since it contains JSON

This commit is contained in:
Paul-Christian Volkmer 2023-08-03 12:59:53 +02:00
parent 577509e6f2
commit ac91620651

View File

@ -54,7 +54,7 @@ class KafkaResponseProcessor(
it.processedAt = Instant.ofEpochMilli(data.timestamp()) it.processedAt = Instant.ofEpochMilli(data.timestamp())
it.report = Report( it.report = Report(
"Warnungen über mangelhafte Daten", "Warnungen über mangelhafte Daten",
responseBody.statusBody objectMapper.writeValueAsString(responseBody.statusBody)
) )
requestRepository.save(it) requestRepository.save(it)
} }
@ -64,7 +64,7 @@ class KafkaResponseProcessor(
it.processedAt = Instant.ofEpochMilli(data.timestamp()) it.processedAt = Instant.ofEpochMilli(data.timestamp())
it.report = Report( it.report = Report(
"Fehler bei der Datenübertragung oder Inhalt nicht verarbeitbar", "Fehler bei der Datenübertragung oder Inhalt nicht verarbeitbar",
responseBody.statusBody objectMapper.writeValueAsString(responseBody.statusBody)
) )
requestRepository.save(it) requestRepository.save(it)
} }
@ -83,6 +83,6 @@ class KafkaResponseProcessor(
data class ResponseBody( data class ResponseBody(
@JsonProperty("status_code") @JsonAlias("status code") val statusCode: Int, @JsonProperty("status_code") @JsonAlias("status code") val statusCode: Int,
@JsonProperty("status_body") val statusBody: String @JsonProperty("status_body") val statusBody: Map<String, Any>
) )
} }