Test Routing and Controller Errors
Check if we get routing error if we try to send a request to an invalid route:
Response: HTTP 404, application/json (Hide)
GET /there/is/no/route/like/this
Response:
1 2 3 4 5 6 7 8 9
{ "type": "RoutingError", "message": "String 'there\/is\/no\/route\/like\/this' does not match any of mapped routes", "file": "\/var\/www\/angie.back\/classes\/router\/Router.class.php", "line": 310, "trace": "#0 \/var\/www\/angie.back\/classes\/application\/AngieApplicationAdapter.class.php(212): Router::match('there\/is\/no\/rou...', '')\n#1 \/var\/www\/angie.back\/classes\/application\/AngieApplication.class.php(839): AngieApplicationAdapter->handleHttpRequest('there\/is\/no\/rou...', '')\n#2 \/var\/www\/activecollab.back\/instance\/public\/api.php(19): AngieApplication::handleHttpRequest()\n#3 {main}", "previous": null, "request_string": "there\/is\/no\/route\/like\/this" }
Try if we can make a call with unsupported method for a valid route:
Response: HTTP 404, application/json (Hide)
PUT /labels
Response:
1 2 3 4 5 6 7 8 9 10 11
{ "type": "Angie\\Controller\\Error\\ActionForMethodNotFound", "message": "Controller action labels::index() is not available for PUT method", "file": "\/var\/www\/angie.back\/classes\/application\/AngieApplicationAdapter.class.php", "line": 235, "trace": "#0 \/var\/www\/angie.back\/classes\/application\/AngieApplication.class.php(839): AngieApplicationAdapter->handleHttpRequest('labels', '')\n#1 \/var\/www\/activecollab.back\/instance\/public\/api.php(19): AngieApplication::handleHttpRequest()\n#2 {main}", "previous": null, "controller": "labels", "action": "index", "method": "PUT" }
Now, lets test the speed:
Response: HTTP 200, application/json (Hide)
GET /initial/test-speed
Response:
1 2 3
{ "action_speed": 0.12112 }