-
-
Notifications
You must be signed in to change notification settings - Fork 455
Open
Labels
component:lib-commons-serverIssue related to the @mockoon/commons-server libIssue related to the @mockoon/commons-server libeffort:mediumModerate effort requiredModerate effort requiredpriority:lowNice-to-have features or minor issuesNice-to-have features or minor issuesstatus:need-investigationMore investigation is required to decide if it's feasibleMore investigation is required to decide if it's feasible
Description
Describe the bug
I am running Mockoon in AWS Lambda. This bug does not happen when running Mockoon locally from the desktop app.
When an API request does not match a mock to Mockoon in proxy mode, it fails with a 404 error code instead of being passed to the proxy server.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /pokemon/pikachu</pre>
</body>
</html>
Here are the Mockoon logs for the sample Mockoon config. Note that even though the first request was a match, it still outputted `requestProxied: true:
{"app":"mockoon-server","environmentName":"Test","environmentUUID":"292be3e8-9226-4f3d-a0f7-694efaf301e0","level":"info","message":"Transaction recorded","requestMethod":"GET","requestPath":"?url=https%3A%2F%2Fgithub.com%2Fpokemon%2Fditto","requestProxied":true,"responseStatus":200,"timestamp":"2025-12-19T04:24:18.217Z"}
{"app":"mockoon-server","environmentName":"Test","environmentUUID":"292be3e8-9226-4f3d-a0f7-694efaf301e0","level":"info","message":"Transaction recorded","requestMethod":"GET","requestPath":"?url=https%3A%2F%2Fgithub.com%2Fpokemon%2Fpikachu","requestProxied":true,"responseStatus":404,"timestamp":"2025-12-19T04:24:23.829Z"}
Steps to Reproduce
- Run Mockoon in AWS Lambda using
@mockoon/serverless@9.4.0 - Call Mockoon endpoint
<host>/pokemon/ditto. Get"pokemon": "ditto"as response - Call Mockoon endpoint
<host>/pokemon/pikachu. Get 404 response as if request was not proxied.
Mockoon version:
@mockoon/serverless@9.4.0
This bug does not happen in 9.3.0.
OS / OS version:
AWS Lambda running NodeJS v20
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
component:lib-commons-serverIssue related to the @mockoon/commons-server libIssue related to the @mockoon/commons-server libeffort:mediumModerate effort requiredModerate effort requiredpriority:lowNice-to-have features or minor issuesNice-to-have features or minor issuesstatus:need-investigationMore investigation is required to decide if it's feasibleMore investigation is required to decide if it's feasible