<div dir="ltr">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 class="gmail_extra"><div class="gmail_quote"><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 class="im">On 06/08/13 21:56, Jonathan LaCour wrote:<br>
> James Slagle <<a href="mailto:james.slagle@gmail.com">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 class=""><div class="h5"><br></div></div></blockquote><div><br></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>