fix(dav): render DAV exceptions as XML

This commit is contained in:
Francis Lachapelle
2022-02-01 14:20:32 -05:00
parent 348a79c795
commit 96bb8b4cc2
10 changed files with 87 additions and 67 deletions
+6 -6
View File
@@ -483,13 +483,13 @@ static NSArray *childRecordFields = nil;
error = nil;
}
NS_HANDLER
error = [NSException exceptionWithHTTPStatus: 409
reason: @"Existing name"];
error = [NSException exceptionWithDAVStatus: 409
reason: @"Existing name"];
NS_ENDHANDLER;
}
else
error = [NSException exceptionWithHTTPStatus: 403
reason: @"Empty string"];
error = [NSException exceptionWithDAVStatus: 403
reason: @"Empty string"];
return error;
}
@@ -593,8 +593,8 @@ static NSArray *childRecordFields = nil;
[self displayName];
if ([nameInContainer isEqualToString: @"personal"])
error = [NSException exceptionWithHTTPStatus: 403
reason: @"folder 'personal' cannot be deleted"];
error = [self exceptionWithHTTPStatus: 403
reason: @"folder 'personal' cannot be deleted"];
else
error = [[self folderManager] deleteFolderAtPath: ocsPath];