You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@usergrid.apache.org by mdunker <gi...@git.apache.org> on 2015/12/31 01:56:03 UTC

[GitHub] usergrid pull request: USERGRID-1189: fix confusing error messages...

GitHub user mdunker opened a pull request:

    https://github.com/apache/usergrid/pull/453

    USERGRID-1189: fix confusing error messages in REST layer

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/mdunker/usergrid USERGRID-1189

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/usergrid/pull/453.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #453
    
----
commit abf27db752d9e00770df88defa4489b9b642d819
Author: Mike Dunker <md...@apigee.com>
Date:   2015-12-31T00:54:11Z

    USERGRID-1189: fix confusing error messages in REST layer

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] usergrid pull request: USERGRID-1189: fix confusing error messages...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/usergrid/pull/453


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] usergrid pull request: USERGRID-1189: fix confusing error messages...

Posted by mdunker <gi...@git.apache.org>.
Github user mdunker commented on a diff in the pull request:

    https://github.com/apache/usergrid/pull/453#discussion_r48642509
  
    --- Diff: stack/rest/src/main/java/org/apache/usergrid/rest/management/users/organizations/OrganizationsResource.java ---
    @@ -113,8 +113,8 @@ public ApiResponse newOrganizationForUserFromForm( @Context UriInfo ui, Map<Stri
             ApiResponse response = createApiResponse();
             response.setAction( "new organization for user" );
     
    -        if ( organizationName == null ) {
    -            throw new ManagementException( "Could not find organization for name: " + organizationName );
    +        if ( organizationName == null || organizationName.isEmpty() ) {
    +            throw new ManagementException( "Organization not specified." );
    --- End diff --
    
    This only happens if the organization name is null or an empty string. What do we have to return? :)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] usergrid pull request: USERGRID-1189: fix confusing error messages...

Posted by GERey <gi...@git.apache.org>.
Github user GERey commented on a diff in the pull request:

    https://github.com/apache/usergrid/pull/453#discussion_r48642476
  
    --- Diff: stack/rest/src/main/java/org/apache/usergrid/rest/management/users/organizations/OrganizationsResource.java ---
    @@ -113,8 +113,8 @@ public ApiResponse newOrganizationForUserFromForm( @Context UriInfo ui, Map<Stri
             ApiResponse response = createApiResponse();
             response.setAction( "new organization for user" );
     
    -        if ( organizationName == null ) {
    -            throw new ManagementException( "Could not find organization for name: " + organizationName );
    +        if ( organizationName == null || organizationName.isEmpty() ) {
    +            throw new ManagementException( "Organization not specified." );
    --- End diff --
    
    I would think we'd want to still throw back the name of the organization we haven't found in order to search through logs better? Is there a reason we wouldn't want to do that?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] usergrid pull request: USERGRID-1189: fix confusing error messages...

Posted by michaelarusso <gi...@git.apache.org>.
Github user michaelarusso commented on the pull request:

    https://github.com/apache/usergrid/pull/453#issuecomment-169825242
  
    :+1: 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---