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

Re: [Pulp-list] RESTful Practices

On 06/16/2010 08:56 PM, Jason L Connor wrote:
Hi All,

I've put together a document on the wiki describing the practices I
think we should adopt for juicer's rest api.


A couple of caveats:
      * the document's tone is authoritative, but it is just a draft and
        open for comments and criticisms.
      * the document does not reflect the condition of the current api.
        please don't be fooled by the examples.

Please take a look at this document at your earliest convenience. All
feedback can be sent to this mailing list.


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

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

~ Prad

_______________________________________________ Pulp-list mailing list Pulp-list redhat com https://www.redhat.com/mailman/listinfo/pulp-list

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