Fixed IDs for Schreibgebrauch usage
diff --git a/dev/js/src/api.js b/dev/js/src/api.js
index 87073d6..eeddc58 100644
--- a/dev/js/src/api.js
+++ b/dev/js/src/api.js
@@ -67,8 +67,15 @@
4 - done
*/
if (this.readyState == 4) {
- if (this.status === 200)
- onload(JSON.parse(this.responseText));
+ if (this.status === 200) {
+ var json = JSON.parse(this.responseText);
+ if (json["errors"] !== null) {
+ for (var i in json["errors"]) {
+ KorAP.log(json["errors"][i][0], json["errors"][i][1]);
+ };
+ };
+ onload(json);
+ }
else
KorAP.log(this.status, this.statusText);
}