#2716 Converting HTML error message to text
Closed: migrated 3 years ago by dmoluguw. Opened 6 years ago by edewata.

Depending on the type of the problem, sometimes pkispawn may display a hard to read HTML error message, for example:

<html><head><title>Apache Tomcat/7.0.76 - Error report</title><style><!--H1 {fon
t-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:
22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525
D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;backgro
und-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;col
or:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:w
hite;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;backgroun
d:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR
{color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - java.io.FileNot
FoundException: /tmp/pkcs/ca_backup_keys.p12 (Permission denied)</h1><HR size="1
" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u>java
.io.FileNotFoundException: /tmp/pkcs/ca_backup_keys.p12 (Permission denied)</u><
/p><p><b>description</b> <u>The server encountered an internal error that preven
ted it from fulfilling this request.</u></p><p><b>exception</b> <pre>org.jboss.r
esteasy.spi.UnhandledException: java.io.FileNotFoundException: /tmp/pkcs/ca_back
up_keys.p12 (Permission denied)
        org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(Exce
ptionHandler.java:76)
        org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandle
r.java:212)
        ...

The error message would be much easier to read if it's converted to text:

# HTTP Status 500 - java.io.FileNotFoundException:
/tmp/pkcs/ca_backup_keys.p12 (Permission denied)

* * *

**type** Exception report

**message** _java.io.FileNotFoundException: /tmp/pkcs/ca_backup_keys.p12 (Permission denied)_

**description** _The server encountered an internal error that prevented it from fulfilling this request._

**exception**


    org.jboss.resteasy.spi.UnhandledException: java.io.FileNotFoundException: /tmp/pkcs/ca_backup_keys.p12 (Permission denied)
            org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:76)
            org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:212)
            ...

The pkispawn could be modified to use python-html2text or a similar tool to covert the error message automatically.


Metadata Update from @edewata:
- Custom field component adjusted to General
- Custom field feature adjusted to ''
- Custom field origin adjusted to Community
- Custom field proposedmilestone adjusted to ''
- Custom field proposedpriority adjusted to ''
- Custom field reviewer adjusted to ''
- Custom field type adjusted to defect
- Custom field version adjusted to ''
- Issue priority set to: minor
- Issue set to the milestone: FUTURE

6 years ago

Dogtag PKI is moving from Pagure issues to GitHub issues. This means that existing or new
issues will be reported and tracked through Dogtag PKI's GitHub Issue tracker.

This issue has been cloned to GitHub and is available here:
https://github.com/dogtagpki/pki/issues/2836

If you want to receive further updates on the issue, please navigate to the
GitHub issue and click on Subscribe button.

Thank you for understanding, and we apologize for any inconvenience.

Metadata Update from @dmoluguw:
- Issue close_status updated to: migrated
- Issue status updated to: Closed (was: Open)

3 years ago

Login to comment on this ticket.

Metadata