[Pulp-list] Importer Sync APIs
Nick Coghlan
ncoghlan at redhat.com
Thu Nov 24 01:50:35 UTC 2011
On 11/22/2011 02:34 PM, Nick Coghlan wrote:
> You could probably do something fancier by using exceptions, but "error
> message or None" seems to cover all the important aspects.
OK, I've actually started experimenting with the config validation now
and have discovered a couple of things:
1. Any exceptions thrown by the plugin will get caught and logged by the
plugin manager. That's very useful to know, since it means I don't need
to trap the exceptions thrown by my existing validator - I can just let
them escape and Pulp will log the failure for me.
2. However, there appears to be a problem inside Pulp if validation
fails - if I set the plugin to just return "False" all the time (or if
it throws an exception), then I get a 500 Internal Server Error response
rather than the expected 400 Bad Request error. (There wasn't anything
obvious in the Pulp log or the Apache log to explain what was going on)
Now that I know about the first point, this isn't a blocker for me any
more - I can use the logged exception information from pulp.log to debug
the configuration code in my test client.
Cheers,
Nick.
--
Nick Coghlan
Red Hat Engineering Operations, Brisbane
More information about the Pulp-list
mailing list