diff --git a/ghost/portal/src/components/ParentContainer.js b/ghost/portal/src/components/ParentContainer.js index 12f76e532c..3ea844939a 100644 --- a/ghost/portal/src/components/ParentContainer.js +++ b/ghost/portal/src/components/ParentContainer.js @@ -32,7 +32,9 @@ export default class ParentContainer extends React.Component { this.GhostApi = setupGhostApi({adminUrl}); this.fetchData(); } else { + /* eslint-disable no-console */ console.error(`[Members.js] Failed to initialize, pass a valid admin url.`); + /* eslint-enable no-console */ this.setState({ action: 'init:failed:missingAdminUrl' }); @@ -53,7 +55,9 @@ export default class ParentContainer extends React.Component { initStatus: 'success' }); } catch (e) { + /* eslint-disable no-console */ console.error(`[Members.js] Failed to fetch site data, please make sure your admin url - ${adminUrl} - is correct.`); + /* eslint-enable no-console */ this.setState({ action: 'init:failed:incorrectAdminUrl', initStatus: 'failed' diff --git a/ghost/portal/src/utils/api.js b/ghost/portal/src/utils/api.js index c4f1aa2ade..c59fa3729c 100644 --- a/ghost/portal/src/utils/api.js +++ b/ghost/portal/src/utils/api.js @@ -104,7 +104,7 @@ function setupGhostApi({adminUrl}) { window.location.reload(); return 'Success'; } else { - console.log('Failed to signout!', res); + throw new Error('Failed to signout'); } }); },