Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve handling of timeouts when calling onNewTxRequest #56

Open
tuliomir opened this issue Jun 22, 2022 · 0 comments
Open

Improve handling of timeouts when calling onNewTxRequest #56

tuliomir opened this issue Jun 22, 2022 · 0 comments

Comments

@tuliomir
Copy link

tuliomir commented Jun 22, 2022

On testnet, we received the following error:

022-06-21T02:37:20.481Z [wallet-service-daemon] error: Unexpected token u in JSON at position 0 
Stack: 'SyntaxError: Unexpected token u in JSON at position 0
at JSON.parse (<anonymous>)
at Response.<anonymous> (/app/hathor-wallet-service-sync_daemon.cjs.production.min.js:1:12602)
at Request.<anonymous> (/app/node_modules/aws-sdk/lib/request.js:367:18)
at Request.callListeners (/app/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
at Request.emit (/app/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
at Request.emit (/app/node_modules/aws-sdk/lib/request.js:686:14)
at Request.transition (/app/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/app/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /app/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request.<anonymous> (/app/node_modules/aws-sdk/lib/request.js:38:9)' 
}

Probably we received an undefined as a response instead of a valid JSON, and that crashed the process. On further investigation a timeout in the OnNewTxRequest was probably the reason, causing the Daemon to receive nothing as response.

It would be important to add more context metadata to this error handling for faster pinpointing of the error cause.

@luislhl luislhl changed the title Vague error description on failed JSON response Improve handling of timeouts when calling onNewTxRequest Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant