<div dir="ltr">There's a fix for this in WSME trunk, but it only works with Pecan at the moment. Now that I'm back from vacation, I will resume working on getting WSME onto StackForge and a new release cut.<div><br>
</div><div>Doug</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 6, 2013 at 7:36 PM, Devananda van der Veen <span dir="ltr"><<a href="mailto:devananda.vdv@gmail.com" target="_blank">devananda.vdv@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div class="h5">On Tue, Aug 6, 2013 at 2:17 PM, Mac Innes, Kiall <span dir="ltr"><<a href="mailto:kiall@hp.com" target="_blank">kiall@hp.com</a>></span> wrote:<br>
</div></div><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<div>On 06/08/13 21:56, Jonathan LaCour wrote:<br>
> James Slagle <<a href="mailto:james.slagle@gmail.com" target="_blank">james.slagle@gmail.com</a>> wrote:<br>
><br>
>> WSME + pecan is being used in Tuskar:<br>
>> <a href="https://github.com/tuskar/tuskar" target="_blank">https://github.com/tuskar/tuskar</a> (OpenStack management API)<br>
>><br>
>> We encountered the same issue discussed here.  A solution we settled<br>
>> on for now was to use a custom Renderer class that could handle<br>
>> different response codes.  You set the renderer in the call to<br>
>> pecan.make_app.  This was meant to be a temporary solution until<br>
>> there's better support in WSME.<br>
><br>
> If there is anything I can do on the Pecan side, let me know! Happy to build in new functionality to make this easier, in general. It does seem to make sense to be fixed on the WSME side, though.<br>
><br>
> Best --<br>
><br>
> - Jonathan<br>
<br>
</div>Nah - this is entirely on the WSME side :)<br>
<br>
WSME translate all exceptions that don't extend their ClientExcption to<br>
HTTP 500, and anything that does to HTTP 400.<br>
<br>
Beyond that, you only have the "default status code" to work with - 401,<br>
404, 503 etc are all off limits with stock WSME. Literally you have a<br>
default code for successful requests, and 400 or 500. Nothing else.<br>
<br>
It seems like Ceilometer has worked there way around it using the<br>
"_lookup" method for 404's (but I can't find how they return any other<br>
status codes..), and libra + tuskar have replaced the WSME error<br>
handling for something entirely custom.<br>
<br>
We're not massively interested in replacing WSME's error handling with<br>
something custom, so our plan is to just use Pecan and ignore WSME for<br>
the Designate v2 API. When it's ready, hopefully the switch won't be too<br>
painful!<br>
<br>
Thanks,<br>
Kiall<br>
<div><div><br></div></div></blockquote><div><br></div></div></div>Ironic is also using WSME, and has been bitten by this issue. In certain situations we want to return either a 200 or a 202, which doesn't work for the same reasons.<div>


<br></div><div>-Deva </div></div></div></div>
<br>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div>