Skip to content

No mock matched

The answer a project’s address gives when no active mock matches the request and nothing forwards it to an upstream.

Field Value
type https://mockhub.dev/problems/no-mock-matched
Status 404

The project was found and the request passed its access checks, but none of its active mocks matches the request: no mock has this method and path, a rule such as a header, cookie, form field, multipart part or body condition does not hold, an inactive mock would have matched, or a mock waits for a scenario state or a data store record the project does not have. MockHub then answers this itself.

In Proxy unmatched mode such a request goes to the project’s upstream instead, and the caller gets the upstream’s answer. In Record everything mode every request goes there. Both modes answer this when no Upstream base URL is set, and so do they on a plan that does not include forwarding.

Always 404.

Only from a project’s own address, in any gateway mode that leaves the request unanswered. Try it in the mock editor says which rule failed instead.

When detail
Always No active mock in this project matches <method> <path>., such as No active mock in this project matches GET /nope.

The detail names the request’s method and its path, without the query string, which can carry a secret. A path longer than 200 characters is cut short and ends with …. Other 404s at a project’s address are not this type: Project not found for a hostname no project answers, and an empty 404 for a reserved path under /__admin; see Gateway behaviour and limits.

This type carries no extension members. It is sent as application/problem+json.

{
"type": "https://mockhub.dev/problems/no-mock-matched",
"title": "No mock matched",
"status": 404,
"detail": "No active mock in this project matches GET /nope."
}
  1. Open the project’s Request logs and find the request, which shows No mock matched under Answered by. A new project logs these requests, because its Log requests no mock answered setting is on; if it was turned off, turn it back on and send the request again.
  2. Select Why didn’t this match? on the logged request. It says what stopped each of the closest mocks.
  3. Fix the mock, or the request, as My request returns 404 describes for each cause. To answer the request from a new mock, select Create a mock from this request.

An AI assistant connected over MCP reads the same requests with list_request_logs, and asks why one did not match with explain_request_log_match.

Report a problem with this page