Returning 404 - or basically any status code other than 400/500

Bug #1214073 reported by Doug Hellmann
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
WSME
Fix Released
Undecided
Vitaly Kostenko

Bug Description

[Imported from https://bitbucket.org/cdevienne/wsme/issue/10]

Currently, It seems impossible to use HTTP status codes other than 400/500 without "breaking out" of WSME and loosing/replacing the build in error handling.

I'm sure there is a way to do this - REST is the only non-ext protocol after all - Could the documentation be updated to include examples of how this should be done?

Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

[imported from comment on the original ticket]

Hello Kiall

Sorry not to have let your message go to the mailing-list : i was so busy the message was gone before I could have a look.

The status code handling is poorly handled for now and as you said one a specific error code is returned we loose the built-in error handling.

It is a thing I want to make more clean in the next version. Stay tuned !

Christophe

Changed in wsme:
assignee: nobody → Vitaly Kostenko (vitalij-ua)
Revision history for this message
Vitaly Kostenko (vitalij-ua) wrote :

Hi.
I've submitted fix for review (https://review.openstack.org/#/c/43078/)
Bests

Changed in wsme:
status: Confirmed → Fix Committed
Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

The bug status shouldn't be "Fix Committed" until the change is approved and merged into master.

Changed in wsme:
status: Fix Committed → In Progress
Revision history for this message
Vitaly Kostenko (vitalij-ua) wrote :

got it. sorry.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

No problem! We're still setting up the pieces to make it so gerrit can do that automatically, so when the time comes you shouldn't even need to do anything. :-)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to wsme (master)

Reviewed: https://review.openstack.org/43078
Committed: http://github.com/stackforge/wsme/commit/651ad18bdde92e550eee68aa7522288a5de94cdd
Submitter: Jenkins
Branch: master

commit 651ad18bdde92e550eee68aa7522288a5de94cdd
Author: 119Vik <email address hidden>
Date: Wed Aug 21 11:59:39 2013 +0300

    Fix for returned status code and .gitignore

    For this purposes I added addiitional processing of original
    exceptions at wsme/wsmeext/pecan.py. For exception's validation
    special validator was added to wsme/wsmeext/utils.py. Also
    functionality was reworked to be compatible with python3.3

    Fixes bug#1214073
    Change-Id: Ib1cd0b274bda11f62298848ebcd55b3f6641757c

Changed in wsme:
status: In Progress → Fix Committed
Changed in wsme:
milestone: none → 0.8.0
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.