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
Fixes #26758 - unify renderer_error helper #6746
Conversation
Issues: #26758 |
Ho ho ho, tests failed. Hmmm. |
b908ea8
to
7d2aa54
Compare
Let's see if tests pass. |
Thanks, added your commit as "refs". Let's see. |
Tests are still 🔴 :-( |
807405b
to
bfbf29f
Compare
Ok it was a mess, now it follows the same parameters as other controllers have: message and options hash. |
@@ -171,7 +171,11 @@ def verify_found_host | |||
end | |||
|
|||
error = host_verifier.errors.first | |||
render_error(error[:type], error[:message], error[:params]) | |||
if ipxe_request? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't render_error
already handle this path correctly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm refactoring of refactored code and you end up with this ;-)
bfbf29f
to
1e357cc
Compare
Rebased, fixed missed test. |
if ipxe_request? | ||
render_ipxe_message(message: message, status: options[:status] || :not_found) | ||
else | ||
super(message, options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: You can just call super
here. No need to pass the parameters.
Rebased. During RC testing I found that actually we have a bug in core which is fixed by this PR:
This appears only when there is a rendering error (which is the case for RC). I will propose this one for cherry pick. |
1e357cc
to
2b306bf
Compare
[test foreman] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
1.23 - 11e8580 |
Preview actually throws argument error (3 vs 1).