Skip to content

Not able to get an event from API Gateway in my Mockoon container #1432

Closed Answered by bhatnagarm
bhatnagarm asked this question in Help
Discussion options

You must be logged in to vote

Thanks @255kb for your response,
Apologies I didn't return earlier.
The code suggested above didn't work for me. I think awsHandler() was having issues within Async block.
This workaround worked well though for me:

export const handler = async (event) => {
console.log("EVENT: " + event.headers['x-source-location']);
return await mockoonServerless.awsHandler()(event);
};

I think this might be a useful update to the documentation to add this block of code for people who want to use it. Happy to provide a MR with the changes.

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@255kb
Comment options

255kb Oct 3, 2024
Maintainer

Answer selected by bhatnagarm
Comment options

You must be logged in to vote
1 reply
@255kb
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1431 on June 27, 2024 06:20.