Uploaded image for project: 'GPII - Global Public Inclusive Infrastructure'
  1. GPII - Global Public Inclusive Infrastructure
  2. GPII-1227

Preferences Server returns empty NP set for non-existing tokens

    XMLWordPrintable

    Details

      Description

      The Preferences Server currently returns an empty preference set ({"contexts":{}}) instead of an error message when you try to access an NP set that does not exist. This makes is impossible for a developer to distinguish the following cases:

      1. the requested preference set does not exist;
      2. the requested preference set exists but I did not construct the URL in the correct way (which comes down to the previous case);
      3. the preference set exists but something else is wrong on the server side.

      For the first case, I would expect an error message instead of an empty NP set. (I don't know what would happen in the third case because the cause is undefined.)

      You can test this with the following URL: http://preferences.gpii.net/preferences/iAmSureThisNpSetDoesNotExist.

      Note: There appears to be an error message in preferencesServer.js:

      fluid.fail("User token for getting preferences is undefined - aborting");

      (Background: this comment on the OLB pull request.)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kasper Kasper Markus
              Reporter:
              cstrobbe Christophe Strobbe
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: