-
Notifications
You must be signed in to change notification settings - Fork 462
error handling: no error is returned in case of error #145
Comments
published [email protected] |
@jcalfee I'm encountering this too on both @13.0.1 and @14.0.0 |
I need to see your example. It is working in this case: > eos.transfer('noacct', 'acct', '1 SYS', 'memo', (err, res)=> console.error('ERROR', err))
undefined
> api error => { message: 'action\'s code account \'eosio.token\' does not exist',
file: 'controller.cpp',
line_number: 1420,
...
ERROR {"code":500,"message":"Internal Service Error","error":{"code":3040000,"name":"transaction_exception","what":"transaction exception","details":[{"message":"action's code account 'eosio.token' does not exist","file":"controller.cpp","line_number":1420,"method":"validate_referenced_accounts"}]}} |
Also works for a read-only api: > eos.getActions('eosio', 'a', 0, (err, res)=> {console.error('ERROR', err); console.log('RES', res)})
undefined
> api error => { message: 'Couldn\'t parse int64_t',
...
ERROR { Error: {"code":500,"message":"Internal Service Error","error":{"code":4,"name":"parse_error_exception","what":"Parse Error","details":[{"message":"Couldn't parse int64_t","file":"string.cpp","line_number":100,"method":"to_int64"}]}}
at /home/jcalfee/eosjs/eosjs/node_modules/eosjs-api/lib/apigen.js:115:23
at <anonymous>
at process._tickDomainCallback (internal/process/next_tick.js:228:7) status: 500, statusText: 'Internal Server Error' }
RES undefined |
@jcalfee hey james. I get this internal error message: I have this assert statement in my contract function and in my javascript I call:
|
You can only |
it seems very often nothing happens / is returned from the error callback:
Assumption: a promise / the promises used internally missing a
catch
handler, that is passing the error to the callback based API. This appears in the global node process log:Why do we need this?
Given we want to provide the error in a request / response context we can't rely on the global "uncaughtPromiseException" handler.
The text was updated successfully, but these errors were encountered: