diff --git a/web/src/ApplicationEditPage.js b/web/src/ApplicationEditPage.js index 0c334f9f..9ab282e7 100644 --- a/web/src/ApplicationEditPage.js +++ b/web/src/ApplicationEditPage.js @@ -542,7 +542,7 @@ class ApplicationEditPage extends React.Component { {Setting.getLabel(i18next.t("signup:Terms of Use"), i18next.t("signup:Terms of Use - Tooltip"))} : - { + } value={this.state.application.termsOfUse} style={{marginBottom: "10px"}} onChange={e => { this.updateApplicationField("termsOfUse", e.target.value); }} /> { requestFilters.forEach(filter => filter(url, option)); return new Promise((resolve, reject) => { - originalFetch(url, option).then(res => { - if (!url.startsWith("/api/get-organizations")) { - responseFilters.forEach(filter => filter(res.clone())); - } - resolve(res); - }); + originalFetch(url, option) + .then(res => { + if (!url.startsWith("/api/get-organizations")) { + responseFilters.forEach(filter => filter(res.clone())); + } + resolve(res); + }) + .catch(error => { + reject(error); + }); }); }; diff --git a/web/src/common/modal/AgreementModal.js b/web/src/common/modal/AgreementModal.js index 98890d8f..2125b79f 100644 --- a/web/src/common/modal/AgreementModal.js +++ b/web/src/common/modal/AgreementModal.js @@ -49,7 +49,11 @@ export const AgreementModal = (props) => { function getTermsOfUseContent(url) { return fetch(url, { method: "GET", - }).then(r => r.text()); + }) + .then(r => r.text()) + .catch(error => { + Setting.showMessage("error", `${i18next.t("general:Failed to get TermsOfUse URL")}: ${url}, ${error}`); + }); } export function isAgreementRequired(application) {