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

Ade Lee alee at redhat.com
Wed Jun 27 20:22:45 UTC 2012


ACK .. tested by trying to add a user twice.

[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.

On Tue, 2012-06-26 at 19:15 -0500, Endi Sukma Dewata wrote:
> On 6/7/2012 9:29 AM, Endi Sukma Dewata wrote:
> > If a REST method returns a Response object it has to be handled
> > manually. A new getEntity() method has been added to obtain the
> > entity from the Response object and also map HTTP errors into
> > exceptions.
> >
> > Ticket #161
> 
> New patch attached. Same code, revised patch description.
> 
> 
> _______________________________________________
> Pki-devel mailing list
> Pki-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/pki-devel





More information about the Pki-devel mailing list