Closed Hiroki111 closed 4 months ago
I think this problem is related to the use of.
responses: {
200: {
description: 'This is a success response',
bodyType: 'Product',
},
},
where did you find this in the serverless documentation?
Workaround:
Adding default response
responses: {
default: {},
200: {
description: 'This is a success response',
bodyType: 'Product',
},
},
@Hiroki111 Fixed in v13.3.4
Bug Report
Running a serverless app with "sls offline" and making a request to the app's REST API endpoint results in the following message:
(If I click "http://localhost:3000/dev/products" on the console, I see the error message above on the console)
Current Behavior
Just described above
Sample Code
I've made a repo for this error: https://github.com/Hiroki111/sls-offline-debug
If you run this app by "sls offline", you should be able to see the same error.
Expected behavior/code
"GET | http://localhost:3000/dev/products" return an array of object and the status code is 200.
Environment
serverless
version: [v3.26.0]serverless-offline
version: [^12.0.4]node.js
version: [e.g. v16.14.2]OS
: [Ubuntu 20.04 (WSL2)]Possible Solution
Additional context/Screenshots