-
Notifications
You must be signed in to change notification settings - Fork 177
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
Associate PostgresConnectionClosedException
with error code 08006
#538
Comments
Any We do not want to expose internal exception types as the specification already defines a public API for exception signals. |
Would including specific error codes in |
Thanks for the suggestion. Reporting connection failure with the error code |
PostgresConnectionClosedException
publicPostgresConnectionClosedException
with error code 08006
We now provide error details for client-side exceptions for easier handling of failures. [resolves #538] Signed-off-by: Mark Paluch <mpaluch@vmware.com>
Feature Request
Is your feature request related to a problem? Please describe
When the connection is closed unexpectedly it throws a
PostgresConnectionClosedException
. I would like to handle this scenario programmatically, however, it currently isn't possible to catchPostgresConnectionClosedException
because it's package-private.r2dbc-postgresql/src/main/java/io/r2dbc/postgresql/client/ReactorNettyClient.java
Lines 554 to 564 in a32a679
For example, if I'm listening to notifications and want to restart the connection or channel.
Describe the solution you'd like
I would like for
PostgresConnectionClosedException
to be public so it can be explicitly caught.Describe alternatives you've considered
Presently the only alternative I'm aware of is catching
R2dbcNonTransientResourceException
and checking for the "UNEXPECTED" error message. This isn't ideal because it's not as clear as catching the specific exception, and the message could change in the future.The text was updated successfully, but these errors were encountered: