- Looks like there was a problem saving.
- Report the issue
- here
- .
+
+ {message ?? 'Conflict: please refresh to get latest changes'}
;
}
-});
+
+ if(status === 412) {
+ return
+ Oops!
+
+ {message ?? 'Your client is out of date. Please save your changes elsewhere and refresh.'}
+
+ ;
+ }
+
+ if(HBErrorCode === '04') {
+ return
+ Oops!
+
+ You are no longer signed in as an author of
+ this brew! Were you signed out from a different
+ window? Visit our log in page, then try again!
+
+
+
+ Sign In
+
+
+
+ Not Now
+
+
+ ;
+ }
+
+ if(response?.body?.errors?.[0].reason == 'storageQuotaExceeded') {
+ return
+ Oops!
+
+ Can't save because your Google Drive seems to be full!
+
+ ;
+ }
+
+ if(response?.req.url.match(/^\/api.*Google.*$/m)){
+ return
+ Oops!
+
+ Looks like your Google credentials have
+ expired! Visit our log in page to sign out
+ and sign back in with Google,
+ then try saving again!
+
+
+
+ Sign In
+
+
+
+ Not Now
+
+
+ ;
+ }
+
+ if(HBErrorCode === '09') {
+ return
+ Oops!
+
+ Looks like there was a problem retreiving
+ the theme, or a theme that it inherits,
+ for this brew. Verify that brew
+ {response.body.brewId} still exists!
+
+ ;
+ }
+
+ if(HBErrorCode === '10') {
+ return
+ Oops!
+
+ Looks like the brew you have selected
+ as a theme is not tagged for use as a
+ theme. Verify that
+ brew
+ {response.body.brewId} has the
meta:theme tag!
+
+ ;
+ }
+
+ if(errorCode === 'ECONNABORTED') {
+ return
+ Oops!
+
+ The request to the server was interrupted or timed out.
+ This can happen due to a network issue, or if
+ trying to save a particularly large brew.
+ Please check your internet connection and try again.
+
+ ;
+ }
+
+ return
+ Oops!
+
+ Looks like there was a problem saving.
+ Report the issue
+ here
+ .
+
+ ;
+};
module.exports = ErrorNavItem;
diff --git a/client/homebrew/pages/editPage/editPage.jsx b/client/homebrew/pages/editPage/editPage.jsx
index ad99948a9..51196a444 100644
--- a/client/homebrew/pages/editPage/editPage.jsx
+++ b/client/homebrew/pages/editPage/editPage.jsx
@@ -438,6 +438,13 @@ const EditPage = createClass({
return `https://www.reddit.com/r/UnearthedArcana/submit?title=${encodeURIComponent(title.toWellFormed())}&text=${encodeURIComponent(text)}`;
},
+ clearError : function(){
+ setState({
+ error : null,
+ isSaving : false
+ })
+ },
+
renderNavbar : function(){
const shareLink = this.processShareId();
@@ -449,7 +456,7 @@ const EditPage = createClass({
{this.renderGoogleDriveIcon()}
{this.state.error ?
- :
+ :
{this.renderSaveButton()}
{this.renderAutoSaveButton()}
diff --git a/client/homebrew/pages/homePage/homePage.jsx b/client/homebrew/pages/homePage/homePage.jsx
index 3b8fdbf01..97c893cf5 100644
--- a/client/homebrew/pages/homePage/homePage.jsx
+++ b/client/homebrew/pages/homePage/homePage.jsx
@@ -80,11 +80,19 @@ const HomePage = createClass({
brew : { ...prevState.brew, text: text },
}));
},
+
+ clearError : function(){
+ setState({
+ error : null,
+ isSaving : false
+ })
+ },
+
renderNavbar : function(){
return
{this.state.error ?
- :
+ :
null
}
diff --git a/client/homebrew/pages/newPage/newPage.jsx b/client/homebrew/pages/newPage/newPage.jsx
index 135794a81..c24128a93 100644
--- a/client/homebrew/pages/newPage/newPage.jsx
+++ b/client/homebrew/pages/newPage/newPage.jsx
@@ -211,6 +211,13 @@ const NewPage = createClass({
}
},
+ clearError : function(){
+ setState({
+ error : null,
+ isSaving : false
+ })
+ },
+
renderNavbar : function(){
return
@@ -220,7 +227,7 @@ const NewPage = createClass({
{this.state.error ?
- :
+ :
this.renderSaveButton()
}
diff --git a/client/homebrew/pages/userPage/userPage.jsx b/client/homebrew/pages/userPage/userPage.jsx
index f6fae639d..e4a8b0b4e 100644
--- a/client/homebrew/pages/userPage/userPage.jsx
+++ b/client/homebrew/pages/userPage/userPage.jsx
@@ -39,10 +39,14 @@ const UserPage = (props)=>{
}] : [])
];
+ const clearError = ()=>{
+ setError(null);
+ };
+
const navItems = (
- {error && ()}
+ {error && ()}