-
Notifications
You must be signed in to change notification settings - Fork 727
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
Nicer error pages #2352
Nicer error pages #2352
Conversation
0fc7b35
to
12a1fcd
Compare
12a1fcd
to
690edb0
Compare
try { | ||
get().configure(); | ||
} catch (ConfiguratorException e) { | ||
throw new ConfigurationAsCodeBootFailure(e); |
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.
This requires jenkinsci/jenkins#8442 to work properly although it won't do any harm if not present
@jenkinsci/configuration-as-code-plugin-developers / @jenkinsci/sig-ux any feedback on the error page? |
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.
Looks good to me 😅
} | ||
request.setAttribute("invalidAttribute", cause.getInvalidAttribute()); | ||
request.setAttribute("validAttributes", cause.getValidAttributes()); | ||
request.getView(ConfigurationAsCode.class, "error.jelly").forward(request, response); |
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.
FYI I am getting
java.lang.NullPointerException: Cannot invoke "javax.servlet.RequestDispatcher.forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse)" because the return value of "org.kohsuke.stapler.StaplerRequest.getView(java.lang.Class, String)" is null
at io.jenkins.plugins.casc.ConfigurationAsCode.handleExceptionOnReloading(ConfigurationAsCode.java:207)
at io.jenkins.plugins.casc.ConfigurationAsCodeBootFailure.doDynamic(ConfigurationAsCodeBootFailure.java:17)
in CloudBees CI after a CasC error during startup. Not sure yet if this is reproducible.
Fixes #2351
Before
After
Your checklist for this pull request
🚨 Please review the guidelines for contributing to this repository.