Skip to content

ProblemDetails no longer implements Error#8078

Merged
aarongable merged 2 commits intomainfrom
prob-not-error
Mar 28, 2025
Merged

ProblemDetails no longer implements Error#8078
aarongable merged 2 commits intomainfrom
prob-not-error

Conversation

@aarongable
Copy link
Copy Markdown
Contributor

@aarongable aarongable commented Mar 21, 2025

Remove the .Error() method from probs.ProblemDetails, so that it can no longer be returned from functions which return an error. Update various call sites to use the .String() method to get a textual representation of the problem instead. Simplify ProblemDetailsForError to not special-case and pass-through ProblemDetails, since they are no longer a valid input to that function.

This reduces instances of "boxed nil" bugs, and paves the way for all of the WFE methods to be refactored to simply return errors instead of writing them directly into the response object.

Part of #4980


Warning

Do not merge before #8076 and #8077.

Base automatically changed from verify-return-errs to main March 26, 2025 23:06
@aarongable aarongable marked this pull request as ready for review March 26, 2025 23:28
@aarongable aarongable requested a review from a team as a code owner March 26, 2025 23:28
jprenken
jprenken previously approved these changes Mar 26, 2025
Comment thread wfe2/wfe.go Outdated
Comment thread wfe2/wfe.go
Comment thread web/probs.go Outdated
@aarongable aarongable merged commit 2c28c47 into main Mar 28, 2025
12 checks passed
@aarongable aarongable deleted the prob-not-error branch March 28, 2025 18:36
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.

3 participants