Skip to content
Snippets Groups Projects
Commit d89a7a2c authored by Brian Major's avatar Brian Major
Browse files

nep110 - Added UserNotFoundException to GMSClient update group method

parent a73286e3
No related branches found
No related tags found
No related merge requests found
...@@ -301,11 +301,12 @@ public class GMSClient ...@@ -301,11 +301,12 @@ public class GMSClient
* @return The group after update. * @return The group after update.
* @throws IllegalArgumentException If cyclical membership is detected. * @throws IllegalArgumentException If cyclical membership is detected.
* @throws GroupNotFoundException If the group was not found. * @throws GroupNotFoundException If the group was not found.
* @throws GroupNotFoundException If a member was not found.
* @throws AccessControlException If unauthorized to perform this operation. * @throws AccessControlException If unauthorized to perform this operation.
* @throws java.io.IOException * @throws java.io.IOException
*/ */
public Group updateGroup(Group group) public Group updateGroup(Group group)
throws IllegalArgumentException, GroupNotFoundException, throws IllegalArgumentException, GroupNotFoundException, UserNotFoundException,
AccessControlException, IOException AccessControlException, IOException
{ {
URL updateGroupURL = new URL(this.baseURL + "/groups/" + group.getID()); URL updateGroupURL = new URL(this.baseURL + "/groups/" + group.getID());
...@@ -345,7 +346,10 @@ public class GMSClient ...@@ -345,7 +346,10 @@ public class GMSClient
} }
if (transfer.getResponseCode() == 404) if (transfer.getResponseCode() == 404)
{ {
throw new GroupNotFoundException(error.getMessage()); if (error.getMessage() != null && error.getMessage().toLowerCase().contains("user"))
throw new UserNotFoundException(error.getMessage());
else
throw new GroupNotFoundException(error.getMessage());
} }
throw new IOException(error); throw new IOException(error);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment