Class HTMLFailureRenderer
java.lang.Object
com.peterphi.std.guice.web.rest.jaxrs.exception.XMLFailureRenderer
com.peterphi.std.guice.web.rest.jaxrs.exception.HTMLFailureRenderer
- All Implemented Interfaces:
RestFailureRenderer
A HTML renderer that will only emit HTML when the caller lists text/html as their primary Accept header value
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected boolean
protected String
A comma-delimited list of terms that identify highlightable stack trace lines)protected boolean
If true, a "Create Issue" link will be availableprotected String
protected int
protected int
If non-zero we will try to create and populate an Issue automaticallyprotected boolean
protected boolean
protected boolean
protected boolean
protected String
protected boolean
Fields inherited from class com.peterphi.std.guice.web.rest.jaxrs.exception.XMLFailureRenderer
includeStackTrace, stackTraceRequiresLoggedIn, stackTraceWhenLoggedInRequiresAdminOrService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
render
(RestFailure failure) Allows user-defined code to present the exception in a more user-friendly mannerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.peterphi.std.guice.web.rest.jaxrs.exception.RestFailureRenderer
shouldSuppressLog
-
Field Details
-
highlightTerms
A comma-delimited list of terms that identify highlightable stack trace lines) -
highlightEnabled
@Inject(optional=true) protected boolean highlightEnabled -
enabled
@Inject(optional=true) protected boolean enabled -
requireLoggedIn
@Inject(optional=true) protected boolean requireLoggedIn -
requireRole
-
jvmInfoEnabled
@Inject(optional=true) protected boolean jvmInfoEnabled -
jvmInfoEnvironmentVariablesEnabled
@Inject(optional=true) protected boolean jvmInfoEnvironmentVariablesEnabled -
requestInfoEnabled
@Inject(optional=true) protected boolean requestInfoEnabled -
stackTraceEnabled
@Inject(optional=true) protected boolean stackTraceEnabled -
jiraEnabled
@Inject(optional=true) protected boolean jiraEnabledIf true, a "Create Issue" link will be available -
jiraProjectId
@Inject(optional=true) protected int jiraProjectIdIf non-zero we will try to create and populate an Issue automatically -
jiraIssueType
@Inject(optional=true) protected int jiraIssueType -
jiraEndpoint
-
-
Constructor Details
-
HTMLFailureRenderer
public HTMLFailureRenderer()
-
-
Method Details
-
render
Description copied from interface:RestFailureRenderer
Allows user-defined code to present the exception in a more user-friendly manner- Specified by:
render
in interfaceRestFailureRenderer
- Overrides:
render
in classXMLFailureRenderer
- Returns:
- a non-null Response if desired - otherwise (or if this method throws) the default exeption renderer will be used
-