app.get('/playground', handler);
http://localhost:9000/playground
Request URL: http://localhost:9000/playground
Request Method: GET
Status Code: 200 OK
{"message":"OK"}
http://localhost:9000/playground?error=KO
Request URL: http://localhost:9000/playground?error=KO
Request Method: GET
Status Code: 500 Internal Server Error
{"message":"KO"}
Yes, this is a very good example. One question if we don't pass the status mock function to your mock response then what will happen?