New error handling in poc and features
This commit is contained in:
@@ -25,4 +25,10 @@ Feature: Fail to retrieve resources from nonexistent handler in Kapow! server.
|
||||
Given I have a running Kapow! server
|
||||
When I get the resource "/request/path" for the handler with id "XXXXXXXXXX"
|
||||
Then I get 404 as response code
|
||||
And I get "Handler ID Not Found" as response reason phrase
|
||||
And the response header "Content-Type" contains "application/json"
|
||||
And I get the following response body:
|
||||
"""
|
||||
{
|
||||
"reason": "Handler ID Not Found"
|
||||
}
|
||||
"""
|
||||
|
||||
@@ -27,4 +27,10 @@ Feature: Fail to retrieve an invalid resource for a handler in Kapow! server.
|
||||
When I send a request to the testing route "/foo"
|
||||
And I get the resource "/invented/path"
|
||||
Then I get 400 as response code
|
||||
And I get "Invalid Resource Path" as response reason phrase
|
||||
And the response header "Content-Type" contains "application/json"
|
||||
And I get the following response body:
|
||||
"""
|
||||
{
|
||||
"reason": "Invalid Resource Path"
|
||||
}
|
||||
"""
|
||||
|
||||
@@ -28,4 +28,10 @@ Feature: Fail to retrieve nonexistent resource items in Kapow! server.
|
||||
When I send a request to the testing route "/foo"
|
||||
And I get the resource "/request/params/meloinvento"
|
||||
Then I get 404 as response code
|
||||
And I get "Resource Item Not Found" as response reason phrase
|
||||
And the response header "Content-Type" contains "application/json"
|
||||
And I get the following response body:
|
||||
"""
|
||||
{
|
||||
"reason": "Resource Item Not Found"
|
||||
}
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user