Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
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);