Skip to content

feat: validate function code on deploy (catch syntax errors) #9

@MajorTal

Description

@MajorTal

Problem

Deployed a function with a runtime error (used db.sql() with $1 params before that feature existed). Deploy succeeded — the error only surfaced when the function was invoked. No feedback until a user hit the broken code path.

Suggested Solution

Add basic validation during run402 functions deploy:

  • node --check <file> catches syntax errors
  • Optionally, a --validate flag that does a dry-run import

Even catching obvious syntax errors would save significant debugging time.

Context

Spent 3 deploy cycles debugging a function that could have been caught at deploy time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions