====test==== when validation fails and preferred examples does not exist for code 422, returns code 404 with NOT_FOUND error ====spec==== openapi: 3.0.0 info: title: cats version: '1.0' servers: - url: 'http://localhost:3000' paths: '/cats': post: summary: "Create New Cat" requestBody: required: true content: application/json: schema: type: "object" properties: name: type: "string" minLength: 2 maxLength: 5 example: "John" required: - name responses: "201": description: Successful cat creation "422": description: Failed to create new cat content: application/json: schema: type: "object" properties: code: type: "string" description: "Internal error code received" message: type: "string" description: "The error string version of the internal error" examples: usernameIsTooShort: value: message: "The username is too short" usernameIsTooLong: value: message: "The username is too long" usernameIsEmpty: value: message: "A username MUST be provided" ====server==== mock -p 4010 ${document} ====command==== curl -i --location --request POST 'http://127.0.0.1:4010/cats?__example=someMissingExample&__code=422' --header "Content-Type: application/json" --data '{"name":"very_long_name"}' ====expect==== HTTP/1.1 404 Not Found content-type: application/problem+json {"type":"https://stoplight.io/prism/errors#NOT_FOUND","title":"The server cannot find the requested content","status":404,"detail":"Response for contentType: application/json and exampleKey: someMissingExample does not exist."}