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

Panic when attempting to query unavailable database #637

Closed
dalextorres opened this issue Jan 30, 2025 · 0 comments
Closed

Panic when attempting to query unavailable database #637

dalextorres opened this issue Jan 30, 2025 · 0 comments

Comments

@dalextorres
Copy link
Contributor

Description

I was trying to connect to an oracle instance and my code panicked, after investigating the issue I found that go-ora will not validate the database is serving queries, only that the host + port name are returning OK. Since the listener could be working but the oracle instance be down, during connection process we will not find any issues and try to perform a query in getDBTimeZone() if we don't have timezone for the server.

The first PR fixes the panic that was happening because we're not checking the type of the response before trying to cast and also validates the data returned is the correct type.

Related PRs:
#633
#636

@sijms sijms closed this as completed Feb 23, 2025
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

2 participants