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

Pgx_eof errors are hard to debug #106

Open
brendanlong opened this issue Apr 8, 2021 · 1 comment
Open

Pgx_eof errors are hard to debug #106

brendanlong opened this issue Apr 8, 2021 · 1 comment
Assignees

Comments

@brendanlong
Copy link
Contributor

If the server hangs up on us, we get an annoying Pgx_eof exception with no context:

https://github.com/arenadotio/pgx/blob/master/pgx_async/src/pgx_async.ml#L70

Maybe instead of throwing an exception here, we could return a Result type and then the caller can throw a more useful exception with context about what it was doing?

@brendanlong brendanlong self-assigned this Apr 8, 2021
@brendanlong
Copy link
Contributor Author

brendanlong commented Apr 8, 2021

Looking at the code that triggered this for us, I'm suspicious that this is another issue with Pgx_async.execute_map. I'm wondering if we should just remove that since it's too confusing to debug.

Or improve the error handling it in somehow.

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