[Pulp-list] RESTful Practices

Jason L Connor jconnor at redhat.com
Thu Jun 17 19:42:03 UTC 2010


On Thu, 2010-06-17 at 10:48 -0400, Pradeep Kilambi wrote:
> Good info here. Thanks for pulling this together. Few more that we
> might 
> want to add:
> * Defining custom exceptions to be propagated down to the clients
> from 
> specific handlers with Appropriate Error codes and messages. For 
> consumer handler for example can include the following data client
> can 
> parse and show the user like so:
> 
> Error Code: 405
> Exception: ConsumerException
> Message: Invalid user credentials trying to create a consumer
> 

This is great suggestion and related to the question I had at the bottom
of the document of what does juicer return with valid calls, but invalid
input. I'll look closer at 405s and other server error codes.

> * localizing the exception before sending down to the clients based
> on 
> Accept-language header sent from the client would be a good practice. 
> This way client doesnt have to worry about translating them
> separately. 

Another great suggestion. I'll put this on the wiki. I hadn't considered
internationalization for our error messages, but it's probably just as,
if not more, important there than any where else.

BTW, does anyone have any recommendations for internationalization
libraries for python? Is gettext adequate?

-- 
Jason L Connor
Senior Software Engineer
Systems Management and Cloud Enablement
Red Hat, Inc.
+1.919.890.8331
Freenode: linear
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/pulp-list/attachments/20100617/128b003e/attachment.sig>


More information about the Pulp-list mailing list