mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2024-12-24 20:37:17 +00:00
log error on console, if api returns an error
This commit is contained in:
parent
83fad0fb59
commit
1345a8c67c
6
dist/ethereum.js
vendored
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;
|
||||
};
|
||||
|
||||
|
4
dist/ethereum.js.map
vendored
4
dist/ethereum.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/ethereum.min.js
vendored
2
dist/ethereum.min.js
vendored
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…
Reference in New Issue
Block a user