log error on console, if api returns an error

pull/272/merge
Marek Kotewicz 10 years ago
parent 83fad0fb59
commit 1345a8c67c
  1. 6
      dist/ethereum.js
  2. 4
      dist/ethereum.js.map
  3. 2
      dist/ethereum.min.js
  4. 6
      lib/providermanager.js

6
dist/ethereum.js vendored

@ -783,6 +783,12 @@ ProviderManager.prototype.send = function(data) {
//TODO: handle error here?
var result = this.provider.send(data);
result = JSON.parse(result);
if (result.error) {
console.log(result.error);
return null;
}
return result.result;
};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -76,6 +76,12 @@ ProviderManager.prototype.send = function(data) {
//TODO: handle error here?
var result = this.provider.send(data);
result = JSON.parse(result);
if (result.error) {
console.log(result.error);
return null;
}
return result.result;
};

Loading…
Cancel
Save