Uploaded image for project: 'Shindig'
  1. Shindig
  2. SHINDIG-1489

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

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.5.0-beta2
    • Javascript
    • 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);

      Attachments

        Activity

          People

            ddumont Dan Dumont
            nakajiman Nobuhiro Nakajima
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: