Mock server always returning "mockRequestNotFoundError"

I created a new collection with a single request to learn how to use Postman mock servers and, while I managed to successfully make it private, return different examples for a single route depending on query parameters… Everything broke down when attempting to return an example of a request that has a JSON body.

All I’m receiving now from the mock server is the following error:

{
        "error": {
        "name": "mockRequestNotFoundError",
        "message": "Double check your method and the request path and try again.",
        "header": "No matching requests"
    }
}

Additional data

Hey @epablom :wave:

Welcome to the Postman Community! :postman:

It’s a little difficult to see what’s going on with the cropped images.

Do you have more examples in the request that could be returned?

Is it returning the correct example of you were to use the x-mock-response-name header and the example name as the value?

If you could provide more details, it will help to narrow down what the issue might be here. :pray:

There aren’t any other examples for the query and this one is the only request in the collection.

Using the x-mock-response-name header does, indeed, work. Although it’d be nice to know if there’s another solution to the problem, since I’m aiming to call a similar mock server with the same problem (and a fairly larger collection and set of examples) from an external app in the near future.


Let me know whatever other info would be useful (or what other format instead of the cropped images would). :))

Finally found the problem.

The thing was that the API I was given wasn’t following REST architecture standards and good practices.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.