From b602a9d15db2261710253f43706b22569d323863 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Mon, 16 Sep 2019 19:58:15 +0200 Subject: [PATCH] Handle location form submit errors for (sub)domains --- src/views/app.html | 3 +-- src/views/app.js | 11 +++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/views/app.html b/src/views/app.html index 8974f528e..9da152404 100644 --- a/src/views/app.html +++ b/src/views/app.html @@ -232,9 +232,8 @@
-
{{ location.error.other }}
- +
diff --git a/src/views/app.js b/src/views/app.js index 21c2c42c0..98eae0450 100644 --- a/src/views/app.js +++ b/src/views/app.js @@ -197,6 +197,17 @@ angular.module('Application').controller('AppController', ['$scope', '$location' }; Client.configureApp($scope.app.id, 'location', data, function (error) { + if (error && error.statusCode === 409) { + if (error.location && error.domain) { + $scope.location.error.location = error.message; + $scope.locationForm.$setPristine(); + } else { + $scope.location.error.alternateDomains = error.message; + } + + $scope.location.busy = false; + return; + } if (error) return Client.error(error); $scope.location.success = true;