[Pki-devel] [PATCH] 67 Added REST error handler.

Endi Sukma Dewata edewata at redhat.com
Wed Jun 27 22:51:13 UTC 2012


On 6/27/2012 3:22 PM, Ade Lee wrote:
> ACK .. tested by trying to add a user twice.

Rebased and pushed to master. Thanks.

> [root at alee-workpc profile_test]# pki  -p 9410 user-add agent2 --email
> agent2 at redhat.com --fullName "Agent Two" --password redhat123 --phone
> 5551212
> CMSException: Failed to add user
>
> It would be nice if the exception told me why the user was not added.
> Perhaps you can revisit the user exception code and make sure its
> descriptive enough -- In this case, it fails because I tried to add the
> same user twice.

The original failure is most likely caused by LDAP exception (entry 
already exists). The error description is recorded in the log, but it's 
not returned to the client (same behavior as in the original servlet). 
The server returns a message CMS_USRGRP_USER_ADD_FAILED which doesn't 
contain a space to put the error description. This will be fixed in this 
ticket:

https://fedorahosted.org/pki/ticket/214

-- 
Endi S. Dewata





More information about the Pki-devel mailing list