Postgres: Config diagnostics / logging update (#105666)

* config diagnostics update

* update tests

* fix typo
This commit is contained in:
Sriram
2025-05-22 08:27:36 +01:00
committed by GitHub
parent d692bce405
commit a8e87fc674
6 changed files with 18 additions and 17 deletions
@@ -81,8 +81,8 @@ func ErrToHealthCheckResult(err error) (*backend.CheckHealthResult, error) {
details["verboseMessage"] = pqErr.Message
}
}
if errors.Is(err, ErrInvalidPortSpecified) {
res.Message = fmt.Sprintf("Connection string error: %s", ErrInvalidPortSpecified.Error())
if errors.Is(err, ErrParsingPostgresURL) {
res.Message = fmt.Sprintf("Connection string error: %s", ErrParsingPostgresURL.Error())
if unwrappedErr := errors.Unwrap(err); unwrappedErr != nil {
details["verboseMessage"] = unwrappedErr.Error()
}