aboutsummaryrefslogtreecommitdiff
path: root/packages/aml-backoffice-ui/src/context/config.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/aml-backoffice-ui/src/context/config.ts')
-rw-r--r--packages/aml-backoffice-ui/src/context/config.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/aml-backoffice-ui/src/context/config.ts b/packages/aml-backoffice-ui/src/context/config.ts
index 0ea491ca4..7004225eb 100644
--- a/packages/aml-backoffice-ui/src/context/config.ts
+++ b/packages/aml-backoffice-ui/src/context/config.ts
@@ -65,7 +65,9 @@ export const ExchangeApiProvider = ({
useEffect(() => {
api.getConfig()
.then((resp) => {
- if (api.isCompatible(resp.body.version)) {
+ if (resp.type === "fail") {
+ setChecked({ type: "error", error: TalerError.fromUncheckedDetail(resp.detail) });
+ }else if (api.isCompatible(resp.body.version)) {
setChecked({ type: "ok", config: resp.body });
} else {
setChecked({ type: "incompatible", result: resp.body, supported: api.PROTOCOL_VERSION })