Skip to content

newSecretForCR method is setting an error when no port is defined #309

@xavi-clovr

Description

@xavi-clovr

The newSecretForCR for the PostgresUserReconciler is setting an error in case the port is not defined.

reqLogger.Error(err, fmt.Sprintf("failed to parse host and port from: '%s', using default port 5432", r.pgHost))

In the end this is not an error, specially cause the code sets it to the default one by itself. However it's sending a log error with the whole stack trace of the err being super verbose and being confusing.
A recommendation would be to set it maximum as a warning or log and specially not sending the whole stack trace of the err.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions