Shindig
  1. Shindig
  2. SHINDIG-1489

When HTTP status is not 200, error object is not contained in callback of osapi

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5.0-beta2
    • Component/s: Javascript
    • Labels:
      None

      Description

      When HTTP status is not 200, error object is not contained in callback of osapi.

      osapi.people.get(

      { userId: 'foo'}

      ).execute(function(res)

      { gadgets.log(res.code); gadgets.log(res.message); }

      );

      When HTTP status is 200 and JSON-PRC is error, error object is contained in callback of osapi.

      osapi.people.get(

      { userId: 'foo'}

      ).execute(function(res)

      { gadgets.log(res.error.code); gadgets.log(res.error.message); }

      );

      Is this a bug? You should correct it as follows:

      http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/osapi/osapi.js

      • batch.execute(function(batchResult) {
      • if (batchResult.error) {
      • feralCallback.call(that, batchResult.error);
        + batch.execute(function(batchResult) {
        + if (batchResult.error) {
        + feralCallback.call(that, batchResult);

        Activity

        Hide
        Dan Dumont added a comment -

        Committed r1325910

        Show
        Dan Dumont added a comment - Committed r1325910

          People

          • Assignee:
            Dan Dumont
            Reporter:
            Nobuhiro Nakajima
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development