Closed tillmo closed 4 years ago
@tillmo I am not able to replicate the issue. Could you please give me an example data you tried
@tillmo Was able to replicate the issue. The error it is showing is that
''OperationalError at /rest-auth/registration/ attempt to write a readonly database''
Is the database in readonly mode on server?
The database problem is @jelmd's business, see #44. Here, the point is to properly display unforseen error messages.
You can test your locally running frontend by having quiz.iks.cs.ovgu.de:8000 as backend. Here is the needed patch:
diff --git a/frontend/lqclient/src/components/Authentication/SignUp.jsx b/frontend/lqclient/src/components/Authentication/SignUp.jsx
index 4c43a56..f0299e8 100644
--- a/frontend/lqclient/src/components/Authentication/SignUp.jsx
+++ b/frontend/lqclient/src/components/Authentication/SignUp.jsx
@@ -71,7 +71,7 @@ export class SignUp extends Component {
this.setState({ openBackDrop: true });
axios
.post(
- "http://127.0.0.1:8000/rest-auth/registration/",
+ "http://quiz.iks.cs.ovgu.de:8000/rest-auth/registration/",
this.state.formData
)
.then(res => {
diff --git a/frontend/lqclient/src/components/QuizPage/QuizDescription.jsx b/frontend/lqclient/src/components/QuizPage/QuizDescription.jsx
index 893ce07..e95926f 100644
--- a/frontend/lqclient/src/components/QuizPage/QuizDescription.jsx
+++ b/frontend/lqclient/src/components/QuizPage/QuizDescription.jsx
@@ -17,7 +17,7 @@ export class QuizDescription extends Component {
if (HasSessionExpired()) {
this.props.history.push("/");
} else {
- axios.get("http://127.0.0.1:8000/api/").then(res => {
+ axios.get("http://quiz.iks.cs.ovgu.de:8000/api/").then(res => {
this.setState({ cardDetails: res.data });
});
}
diff --git a/frontend/lqclient/src/components/QuizPage/QuizQuestion.jsx b/frontend/lqclient/src/components/QuizPage/QuizQuestion.jsx
index 17b2dd1..5522e12 100644
--- a/frontend/lqclient/src/components/QuizPage/QuizQuestion.jsx
+++ b/frontend/lqclient/src/components/QuizPage/QuizQuestion.jsx
fixed by #46
Backend errors, e.g. during sign up, are displayed using a snackbar in the frontend. However, some errors are not displayed properly. E.g. instead of the true error message
I got