Closed pinazo closed 11 years ago
The server currently accepts duplicated questions. We should find a way to avoid this.
I left the management of students to the issue #3.
Technically speaking, I changed the server code to use a sha1 hash code created by the attributes Q, O1, O2, O3, O4 and A of a question, and to allow registering of only one question per hash code, even for different students. When trying to add a duplicated question, the server ignores it and logs a warning.
Do we need to send an error message back to the client application instead of silently ignoring the warning? An error 500? Or send back 200 with a response message containing the error condition?
I am trying to not break current protocol until we define a new one. I would suggest to send back 406 with the error condition.
On Friday, April 19, 2013, truedat101 wrote:
Do we need to send an error message back to the client application instead of silently ignoring the warning? An error 500? Or send back 200 with a response message containing the error condition?
— Reply to this email directly or view it on GitHubhttps://github.com/SMILEConsortium/node-smile-server/issues/2#issuecomment-16628861 .
Juan Pinazo
Ok, good point. I'm going to hold this open until I verify on a large scale integration test. I'll run one at Marvell on Thursday. No action needed until then, unless I find an issue before then.
I'll close this. If we can reproduce the problem at one of the school pilot projects, we'll re-open.
Make sure the server does not allow duplicated data such as questions and students.