diff --git a/app/static/js/App.js b/app/static/js/App.js
index e20b30f2..ea8d20f7 100644
--- a/app/static/js/App.js
+++ b/app/static/js/App.js
@@ -16,10 +16,24 @@ class App {
this.data.promises.getUser[userId] = new Promise((resolve, reject) => {
fetch(`/users/${userId}?backrefs=true&relationships=true`, {headers: {Accept: 'application/json'}})
.then(
- (response) => {return response.json();},
(response) => {
- if (response.status === 403) {this.flash('Forbidden', 'error');}
- if (response.status === 404) {this.flash('Not Found', 'error');}
+ switch (response.status) {
+ case 403: {
+ this.flash('Forbidden', 'error');
+ break;
+ }
+ case 404: {
+ this.flash('Not Found', 'error');
+ break;
+ }
+ default: {
+ response.json();
+ break;
+ }
+ }
+ },
+ (response) => {
+ this.flash('Something went wrong', 'error');
reject(response);
}
)
diff --git a/app/static/js/RessourceLists/SpacyNLPPipelineModelList.js b/app/static/js/RessourceLists/SpacyNLPPipelineModelList.js
index 057e7c4c..1d7ddce4 100644
--- a/app/static/js/RessourceLists/SpacyNLPPipelineModelList.js
+++ b/app/static/js/RessourceLists/SpacyNLPPipelineModelList.js
@@ -31,7 +31,7 @@ class SpaCyNLPPipelineModelList extends RessourceList {
|
()
|
-
+
|