Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProblemDetails no longer implements Error #8078

Merged
merged 2 commits into from
Mar 28, 2025
Merged

ProblemDetails no longer implements Error #8078

merged 2 commits into from
Mar 28, 2025

Conversation

aarongable
Copy link
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
@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.

None yet

3 participants