Troubleshooting

After 499 Status Code (Mock Not Found)

1

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

2

Double check rewrite rules

To learn more about rewrite rules, see here

3

Double check lifecycle hooks

To learn more about lifecycle hooks, see here

4

Double check match rules

To learn more about match rules, see here

5

Test using CLI

CLI command to mock HTTP requests:

$ stoobly-agent mock --help
Usage: 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.com

For example here's a POST request

stoobly-agent mock -X POST https://my-service.com \
    --header "Content-Type: application/json" \
    --data '{"key": "value"}'

After Incorrect Response Returned

1

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

2

Create an Endpoint to enable component specific matching

  • To learn more, see here

Last updated

Was this helpful?