1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-12-01 13:24:10 +01:00

Don't mark no content as error on status code 204

This commit is contained in:
Thomas Tanghus 2013-09-03 19:25:29 +02:00
parent 13aab94158
commit 5578d02e4a

View File

@ -11,10 +11,13 @@ OC.Contacts = OC.Contacts || {};
this.getAllResponseHeaders = jqXHR.getAllResponseHeaders;
this.getResponseHeader = jqXHR.getResponseHeader;
this.statusCode = jqXHR.status;
// 204 == No content
if(!response) {
console.log('jqXHR', jqXHR);
this.error = true;
this.message = jqXHR.statusText;
if(this.statusCode !== 204) {
console.log('jqXHR', jqXHR);
this.error = true;
this.message = jqXHR.statusText;
}
} else {
if(response.status === 'error') {
this.error = true;