Remove ProcfileParsingError::RegexError
as a user-facing error
#77
+36
−55
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There is currently only one error variant for
ProcfileParsingError
, an error that only occurs if it was not possible to compile the regex used to parse aProcfile
.This regex is buildpack-supplied, so if such an error occurs, it's always an internal buildpack error.
However previously a user-facing error message was shown, that told the user to check their
Procfile
was valid, which has no bearing on whether the regex will compile.Rather than just correct the error message, the error has been removed and instead
.expect()
used, since such regex errors will not happen in practice, given they will be caught by both theinvalid_regex
Clippy lint and the buildpack's tests. See the discussion in:#76 (comment)
I believe part of the reason for this confusion over error messages is that the error message handling was split across multiple files due to the use of
thiserror
meaning that the display representation could be leant upon, without actually looking closely at what was being displayed.As such, I've removed
thiserror
, since I think the error handling is easier to reason about without it.Fixes #74.
GUS-W-11318868.