EOSIO / eosjs

General purpose library for the EOSIO blockchain.
http://eosio.github.io/eosjs
MIT License
1.43k stars 463 forks source link

Getting 2x the same error returned from invalid transactions. #177

Closed ghost closed 6 years ago

ghost commented 6 years ago

I'm getting 2 duplicate error messages returned from invalid transactions. I'm able to catch one of the two but the the other seems to be uncatchable. image

image

jcalfee commented 6 years ago

This should turn it off:

config.logger: {
    error: () => {}
}

https://github.com/eosio/eosjs-api#configuration

ghost commented 6 years ago

thanks for the suggestion but it doesn't seem to help. image also tried: logger: { log: () => {}, error: () => {}, debug: () => {} } But the issue persists. Also I opened a similar issue in the scatter repo. But I think the problem originate in eosjs. This problem is not a big deal in the OS console but in the browser you don't want unnecessary errors. https://github.com/EOSEssentials/Scatter/issues/79

jcalfee commented 6 years ago

The logger is only 1/2 implemented .. I need go in and standardize it so it applies to logging in all packages. I'll reference this ticket on those changes.

jcalfee commented 6 years ago

The most efficient way to turn off a logging level is to use null. Re-direct by providing a function.

config.logger: {error: null}

released: eosjs@14.2.0