[katello-devel] Error Responses And Subscription Manager
Dmitri Dolguikh
dmitri at redhat.com
Wed Jul 6 15:21:02 UTC 2011
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/katello-devel/attachments/20110706/c0d813b0/attachment.htm>
More information about the katello-devel
mailing list