Skip to content

netlify dev: correctly mirror Lambda's behaviour when returning synchronously #4304

@Skn0tt

Description

@Skn0tt

As captured in netlify/functions#308, there's currently a difference in behaviour between ntl dev and production behaviour for functions that respond synchronously:

export const handler = (event) => {
  return { statusCode: 200, body: "test" }
}

While ntl dev will takes this as a literal response, a deployed function will discard this return value. Since that behaviour is controlled by Lambda, we should move ntl dev's behaviour in-line.

Metadata

Metadata

Assignees

Labels

type: bugcode to address defects in shipped code

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions