Skip to content

Channel doesn't exist should raise 404 not 500 #83

@timc3

Description

@timc3

I am getting 500 errors when trying to check for channels, instead of 404:

2010-11-10 16:37:58,524 - HookboxRest - WARNING - REST Error: /get_channel_info
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/hookbox-0.3.4dev-py2.6.egg/hookbox/api/web.py", line 29, in call
return handler(form, start_response)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/hookbox-0.3.4dev-py2.6.egg/hookbox/api/web.py", line 172, in render_get_channel_info
info = self.api.get_channel_info(channel_name)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/hookbox-0.3.4dev-py2.6.egg/hookbox/api/internal.py", line 95, in get_channel_info
raise ExpectedException("Channel %s doesn't exists" % (channel_name,))
ExpectedException: Channel /my/channnnnel doesn't exists

Not exactly RESTful if it doesn't respond with the correct status codes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions