Closed jboddey closed 1 month ago
What were the steps to reproduce before this correction? Removing the specific method to raise the Value error from the session introducess a bug to detect duplicate certificates as it now reports the wrong error:
Adding ValueError back in corrects this error:
Are we sure the reported issue was using a bad certificate format and not a duplicate?
The issue was that duplicate value errors were being thrown so the session was catching it's own error. I've updated the logic and tested the 3 scenarios: filename duplicate, common name duplicate and invalid certificate.
When the user uploads a cert and an error occurs, the user is informed that a cert with the same name already exists. However, this is not the case, and instead the cert was not the correct format - raising an exception. The logic behind determining the error message for the user was incorrect. This PR aims to fix that by correcting error logic.
New output: