Troubleshooting
After 499 Status Code (Mock Not Found)
Double check if the correct scenario is used
Double check if request exists in the scenario
By default the UI is configured to run on http://localhost:4200
Double check rewrite rules
To learn more about rewrite rules, see here
Double check lifecycle hooks
To learn more about lifecycle hooks, see here
Double check match rules
To learn more about match rules, see here
Test using CLI
CLI command to mock HTTP requests:
$ stoobly-agent mock --helpUsage: stoobly-agent mock [OPTIONS] URL
Mock request
Options:
-d, --data TEXT HTTP POST data
--format [raw] Format response
-H, --header TEXT Pass custom header(s) to server
-X, --request TEXT Specify request command to use
--scenario-key TEXT
-h, --help Show this message and exit.Its usage is very similar to cURL where you specify a URL and flags with extra request data.
For example here's a GET request:
stoobly-agent mock https://google.comFor example here's a POST request
stoobly-agent mock -X POST https://my-service.com \
--header "Content-Type: application/json" \
--data '{"key": "value"}'If you already have the request's key handy, you can use the request response get command
$ stoobly-agent request response get --help Usage: stoobly-agent request response get [OPTIONS] REQUEST_KEY
Retrieve mocked response
Options:
-h, --help Show this message and exit.For example, if your Request key is "eyJwIjogMCwgImkiOiAzNjl9", the command would look like this:
$ stoobly-agent request response get eyJwIjogMCwgImkiOiAzNjl9{"key": "value"}After Incorrect Response Returned
Double check if the correct scenario is used
Double check if request exists in the scenario
By default the UI is configured to run on http://localhost:4200
Create an Endpoint to enable component specific matching
To learn more, see here
Last updated
Was this helpful?