[katello-devel] Error Responses And Subscription Manager

Dmitri Dolguikh dmitri at redhat.com
Wed Jul 6 15:40:05 UTC 2011


On 11-07-06 12:33 PM, Devan Goodwin wrote:
> On Wed, Jul 6, 2011 at 12:21 PM, Dmitri Dolguikh<dmitri at redhat.com>  wrote:
>> On 11-07-06 11:56 AM, Devan Goodwin wrote:
>>
>> While working on Katello environment registration we hit an issue
>> where subscription-manager expects the response to contain json when
>> something goes wrong, something like this:
>>
>> {
>>    "displayMessage" : "Invalid Credentials"
>> }%
>>
>> Katello however is just returning text in the body like this:
>>
>> "Organization ACME_Corporation has 'locker' environment only. Please
>> create an environment for system registration."
>>
>> Can we standardize on this "displayMessage" packed in JSON format?
>> Alternatively I could try just display the response body if we get an
>> error and cannot parse JSON from it.
>>
>> Thoughts?
>>
>> Thanks,
>>
>> Devan
>>
>> _______________________________________________
>> katello-devel mailing list
>> katello-devel at redhat.com
>> https://www.redhat.com/mailman/listinfo/katello-devel
>>
>> I think that we should return errors the same way Active Resource does:
>> https://engineering.redhat.com/trac/kalpana/wiki/ActiveResourceErrorParsing.
>> That would allow for showing more localized (in terms of model fields) error
>> messages.
>>
>> -d
>>
> Works for me, we could very easily look for 'errors' as well as
> 'displayMessage' and even change Candlepin to do the same.
Are you working on this now? I'll work on supporting this then...
-d
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/katello-devel/attachments/20110706/7d062d5f/attachment.htm>


More information about the katello-devel mailing list