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

NullPointerException when KOIOS http endpoint is not available #85

Closed
1 task
DevStakePool opened this issue Oct 27, 2022 · 4 comments
Closed
1 task
Assignees
Labels
good first issue Good for newcomers
Milestone

Comments

@DevStakePool
Copy link

What operating system are you using, and which version?

  • Linux / Ubuntu

Steps to Reproduce

Using the latest version of the koios-java-client 1.15.1 I saw some NPE in my bot logs when the koios (mainnet) endpoint is not available

Here's the stack trace

ava.lang.NullPointerException: null
        at rest.koios.client.backend.api.address.impl.AddressServiceImpl.getAddressTransactions(AddressServiceImpl.java:75) ~[koios-java-client-1.15.1.jar!/:na]
        at com.devpool.thothBot.scheduler.TransactionCheckerTask.checkTransactionsForUsers(TransactionCheckerTask.java:169) ~[classes!/:1.0.0-rc1]
        at com.devpool.thothBot.scheduler.TransactionCheckerTask.run(TransactionCheckerTask.java:147) ~[classes!/:1.0.0-rc1]
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[na:na]
        at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[na:na]
        at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[na:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
        at java.base/java.lang.Thread.run(Thread.java:829) ~[na:na]

I also found the following while digging the logs

Requested endpoint with provided parameters was not found! Please verify syntax referring to examples from <a href="https://api.koios.rest">API Documentations</a> !!
</body></html>

 (404)
@edridudi edridudi self-assigned this Oct 27, 2022
@edridudi edridudi added the bug Something isn't working label Oct 27, 2022
@edridudi edridudi added this to the 1.15.2 milestone Oct 27, 2022
@edridudi edridudi added good first issue Good for newcomers and removed bug Something isn't working labels Oct 27, 2022
@edridudi
Copy link
Collaborator

Thanks for reporting.
@DevStakePool Is it possible to elaborate a little more?
what query did you use?
what network?

@DevStakePool
Copy link
Author

Hi @edridudi, I realised it's an issue on my side. Basically my previous call to get the account addresses fails due to unavailability of Koios backend and I'm passing a null list to the rest.koios.client.backend.api.address.impl.AddressServiceImpl.getAddressTransactions() method. I will investigate

@edridudi
Copy link
Collaborator

edridudi commented Dec 4, 2022

Hi @DevStakePool ,
Any news about this issue?

@DevStakePool
Copy link
Author

It was an issue on my side. I would suggest to close this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants