FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Define more errors by joy4eg · Pull Request #367 · caddyserver/certmagic · GitHub

Define more errors - #367

Open
joy4eg wants to merge 2 commits into
caddyserver:masterfrom
joy4eg:master
Open

Define more errors#367
joy4eg wants to merge 2 commits into
caddyserver:masterfrom
joy4eg:master

Conversation

joy4eg commented Jan 23, 2026

Copy link
Copy Markdown

Fixes #365

Copilot AI review requested due to automatic review settings January 23, 2026 13:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Pull request overview

This PR implements standardized error definitions to allow clients to check for specific error conditions using errors.Is(). It addresses issue #365 by defining two exported error variables (ErrCertNotAvailable and ErrCertTimeout) and updating error returns throughout the handshake code to use these standardized errors.

Changes:

  • Added two exported error variables (ErrCertNotAvailable and ErrCertTimeout) for standardized error checking
  • Updated multiple error return statements to wrap these errors using fmt.Errorf with %w
  • Added test coverage to verify ErrCertNotAvailable can be detected using errors.Is()

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
handshake.go Defines two new error variables and updates 5 error return locations to use them with proper error wrapping
handshake_test.go Adds import for errors package and adds test assertion to verify ErrCertNotAvailable is properly detectable

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread handshake.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

Add more standardized error definitions

3 participants


Back | FazBrowse Home | New Git URL