Permalink
Browse files

fixed error handling

  • Loading branch information...
1 parent c72d97c commit b713f9f08e1b9167e060d0c7fe814bbf3982a523 @bobrik committed Oct 1, 2012
Showing with 5 additions and 1 deletion.
  1. +4 −0 index.js
  2. +1 −1 package.json
View
@@ -22,6 +22,10 @@
copiedParams.access_token = this.token;
facebook.apiCall(type, method, copiedParams, function(error, response, body) {
+ if (!error && body.error) {
+ error = body.error;
+ }
+
callback && callback(error, body);
});
};
View
@@ -1,6 +1,6 @@
{
"name": "fb-js",
- "version": "0.1.2",
+ "version": "0.1.3",
"description": "Facebook api for node.js done right, built on top of facebook-js.",
"main": "index.js",
"scripts": {

0 comments on commit b713f9f

Please sign in to comment.