Skip to content

Response selection unavailable

The answer a project’s address gives when a request asks for a response of a mock with X-MockHub-Response and MockHub cannot serve that response for this request.

Field Value
type https://mockhub.dev/problems/response-selection-unavailable
Status 422

The header was well formed, but no response can answer with it. MockHub gives this one answer for every reason, so a caller cannot use it to find out what exists in the project. It never answers the mock’s default in its place and never forwards the request to the project’s upstream, because a test that asked for a particular response must not pass on another.

The usual reasons:

Reason Fix
The key names no response of the mock Copy the header again; a response may have been deleted
The identifier is another mock’s, or another project’s Copy the header from the mock that matches the request
The mock is inactive Activate it; an inactive mock answers nothing
The mock does not match the request Fix the request or the mock’s rules; the header never picks which mock answers
A request may ask for another response is off Turn it on in the mock
The mock answers with a sequence A sequence takes no override; ask a mock with a default response, or send no header
A scenario or data store rule on the mock does not hold The rule still applies to the response that is asked for

Always 422.

Only from a project’s own address, in every gateway mode, including Record everything where no mock runs. It is a request no mock answered: it counts as no mock’s hit, fires no webhook and is left out of the match rate.

When detail
Always The response named in X-MockHub-Response cannot be served for this request. Check that its mock is active, matches the request and allows request overrides.

This type carries no extension members.

{
"type": "https://mockhub.dev/problems/response-selection-unavailable",
"title": "Response cannot be selected",
"status": 422,
"detail": "The response named in X-MockHub-Response cannot be served for this request. Check that its mock is active, matches the request and allows request overrides."
}
  • Open the request under Request logs and select Check matching. It judges the named mock as it is now and says which of the reasons above holds; see Read request logs.
  • Send the same request to the mock with Try it in the editor, under What to try → Which response a request gets, which asks the saved mock the same question.

Report a problem with this page