#892 Need better error handling for HttpConnection send()
Closed: migrated 3 years ago by dmoluguw. Opened 10 years ago by cfu.

The following comments came from edewata:

In the HttpConnection.java, send() function needs better error handling:

  • The HttpConnection.send() checks for untrusted certificate by checking the exception message. This may work now but could become inaccurate later due to translation, text changes, or typo. It would be better if there's a specific exception type or error code that we can check for this specific case.

  • HttpConnection.send() swallows NumberFormatException. I think we should not catch this to detect the error as early as possible and also NumberFormatException is already a RuntimeException so it doesn't need to be wrapped/declared.

  • HttpConnector.send() (not HttpConnection) would swallow the exception so some errors wouldn't be detected immediately. I think the code could be simplified as follows (the send() already throws EBaseException):

    try {
    curConn = mConnFactory.getConn(op);
    return curConn.send(msg);

    } finally {
    if (curConn != null) {
    mConnFactory.returnConn(curConn);
    }
    }


Metadata Update from @cfu:
- Issue set to the milestone: UNTRIAGED

7 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/1459

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