You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shindig.apache.org by "Ryan Baxter (JIRA)" <ji...@apache.org> on 2012/05/30 14:46:32 UTC

[jira] [Updated] (SHINDIG-1489) When HTTP status is not 200, error object is not contained in callback of osapi

     [ https://issues.apache.org/jira/browse/SHINDIG-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ryan Baxter updated SHINDIG-1489:
---------------------------------

    Fix Version/s: 2.5.0-beta2
    
> When HTTP status is not 200, error object is not contained in callback of osapi
> -------------------------------------------------------------------------------
>
>                 Key: SHINDIG-1489
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1489
>             Project: Shindig
>          Issue Type: Bug
>          Components: Javascript 
>            Reporter: Nobuhiro Nakajima
>            Assignee: Dan Dumont
>             Fix For: 2.5.0-beta2
>
>
> 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);

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira