Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved handling of HTTP response errors #152

Merged
merged 12 commits into from
Nov 9, 2023
Next Next commit
WIP manage timeouts, show ace for manual entry
  • Loading branch information
dotasek committed Nov 6, 2023
commit e7f392051a64b4e632dd0298f1cc2c3a294b787f
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ kotlin.code.style=official
kotlin.js.generate.executable.default=false

# versions
fhirCoreVersion=6.2.1
fhirCoreVersion=6.2.2-SNAPSHOT

junitVersion=5.7.1
mockk_version=1.10.2
Expand Down
15 changes: 8 additions & 7 deletions src/jsMain/kotlin/ui/components/tabs/entrytab/ManualEntryTab.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ import kotlinx.coroutines.withTimeout
import kotlinx.css.*
import kotlinx.css.properties.border
import mainScope
import model.BundleValidationRule
import model.CliContext
import model.PackageInfo
import model.ValidationOutcome
import model.*
import react.*
import react.dom.attrs

Expand All @@ -25,6 +22,7 @@ import ui.components.options.presetSelect
import ui.components.tabs.heading

import ui.components.validation.issuelist.filteredIssueEntryList
import ui.components.validation.validationSummary
import utils.assembleRequest
import utils.isJson
import utils.isXml
Expand Down Expand Up @@ -137,7 +135,7 @@ class ManualEntryTab : RComponent<ManualEntryTabProps, ManualEntryTabState>() {
}
}
props.validationOutcome?.let {
filteredIssueEntryList {
validationSummary {
polyglot = props.polyglot
validationOutcome = props.validationOutcome!!
}
Expand Down Expand Up @@ -174,8 +172,11 @@ class ManualEntryTab : RComponent<ManualEntryTabProps, ManualEntryTabState>() {
props.toggleValidationInProgress(false)
}
} catch (e: TimeoutCancellationException) {
//TODO
println("Timeout ${e.message}")
setState {
errorMessage = props.polyglot.t("manual_entry_timeout_exception")
displayingError = true
}
props.toggleValidationInProgress(false)
} catch (e: Exception) {
setState {
if (props.currentManuallyEnteredText.contains("Mark is super dorky")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,6 @@ object IssueEntryStyle : StyleSheet("IssueEntryStyle", isStatic = true) {
val messageDetails by css {
flex(flexBasis = 100.pct)
alignSelf = Align.center
overflowWrap = OverflowWrap.breakWord
overflowWrap = OverflowWrap.anywhere
}
}
9 changes: 8 additions & 1 deletion src/jsMain/kotlin/utils/Preset.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,14 @@ val IPS_AU_IG = PackageInfo(

val CDA_IG = PackageInfo(
"hl7.cda.uv.core",
"2.1.0-draft1",
"2.0.0-sd-ballot",
"5.0.0",
"http:https://hl7.org/cda/stds/core/ImplementationGuide/hl7.cda.uv.core"
)

val CCDA_IG = PackageInfo(
"hl7.cda.us.ccda",
"current",
"5.0.0",
"http:https://hl7.org/cda/stds/core/ImplementationGuide/hl7.cda.uv.core"
)
Expand Down