Implement Resource Item Not Found
This commit is contained in:
@@ -185,6 +185,8 @@ async def get_field(request):
|
|||||||
content = await connection.get(field)
|
content = await connection.get(field)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
return web.Response(status=400, reason="Invalid Resource Path")
|
return web.Response(status=400, reason="Invalid Resource Path")
|
||||||
|
except KeyError:
|
||||||
|
return web.Response(status=204, reason="Resource Item Not Found")
|
||||||
|
|
||||||
if isinstance(content, StreamReader):
|
if isinstance(content, StreamReader):
|
||||||
response = web.StreamResponse(status=200, reason="OK")
|
response = web.StreamResponse(status=200, reason="OK")
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
@wip
|
||||||
Feature: Fail to retrieve nonexistent resource items in Kapow! server.
|
Feature: Fail to retrieve nonexistent resource items in Kapow! server.
|
||||||
If trying to access a nonexistent resource item
|
If trying to access a nonexistent resource item
|
||||||
then the server responds wi | |||||||