Skip to content

feat(restorer): add sentinel errors for WAL restore failures#253

Open
leonardoce wants to merge 1 commit into
cloudnative-pg:mainfrom
leonardoce:error-sentinels
Open

feat(restorer): add sentinel errors for WAL restore failures#253
leonardoce wants to merge 1 commit into
cloudnative-pg:mainfrom
leonardoce:error-sentinels

Conversation

@leonardoce
Copy link
Copy Markdown
Contributor

Expose ErrConnectivity, ErrInvalidWalName, ErrGeneric, and ErrUnrecognizedExitCode alongside the existing ErrWALNotFound, and wrap them in the corresponding exit-code branches of Restore. This lets callers distinguish failure modes via errors.Is instead of matching on error strings.

Expose ErrConnectivity, ErrInvalidWalName, ErrGeneric, and
ErrUnrecognizedExitCode alongside the existing ErrWALNotFound, and wrap
them in the corresponding exit-code branches of Restore. This lets
callers distinguish failure modes via errors.Is instead of matching on
error strings.

Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
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

Successfully merging this pull request may close these issues.

1 participant