[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Pulp-list] RESTful Practices

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.
Freenode: linear

Attachment: signature.asc
Description: This is a digitally signed message part

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]