[Freeipa-devel] [PATCH] Fix raising nonexistent errros.NotImplemented
Rob Crittenden
rcritten at redhat.com
Mon Nov 23 21:55:52 UTC 2009
John Dennis wrote:
> On 11/20/2009 02:50 PM, Rob Crittenden wrote:
>> John Dennis wrote:
>>> - raise errors.NotImplementedError('%s.check_request_status' %
>>> self.name)
>>> + raise NotImplementedError('%s.check_request_status' % self.name)
>>
>> This will go to the client as an Internal Error. Is this what we want?
>>
>> I must've forgotten to include errors.py when I created the original
>> patch for this. I created a new error class for this but it is lost now.
>
> Good question, FWIW it seems like all the other uses of NotImplemented
> use the built-in exception rather one derived from PublicError.
>
> In a way I could imagine this is actually an internal error however it
> would really result from misconfiguration of the server. I think having
> it be an internal error is O.K. but I don't have strong feelings either
> way.
>
Yeah, I'm not sure what to do either. In this case the selfsign plugin
will probably never implement these things. In this case should the
plugin implement a barebones function that says "I don't do that" or
should we raise a more friendly error for the client. It is probably
cleaner to raise our own NotImplemented error for plugins.
I think for the framework the existing NotImplemented is fine b/c the
developer should/would catch those.
rob
More information about the Freeipa-devel
mailing list