-
-
Notifications
You must be signed in to change notification settings - Fork 607
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
va: return error instead of ProblemDetails (#7313)
This allows us to defer creating the user-friendly ProblemDetails to the highest level (va.PerformValidation), which in turn makes it possible to log the original error alongside the user-friendly error. It also reduces the likelihood of "boxed nil" bugs. Many of the unittests check for a specific ProblemDetails.Type and specific Details contents. These test against the output of `detailedError`, which transforms `error` into `ProblemDetails`. So the updates to the tests include insertion of `detailedError(err)` in many places. Several places that were returning a specific ProblemDetails.Type instead return the corresponding `berrors` type. This follows a pattern that `berrors` was designed to enable: use the `berrors` types internally and transform into `ProblemDetails` at the edge where we are rendering something to present to the user: WFE, and now VA.
- Loading branch information
Showing
10 changed files
with
239 additions
and
204 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.