Fix cron routes: POST → GET (Vercel cron sends GET)

Our drip email cron ran its first day and sent zero emails. The cron hit the endpoint, got a 200 back, everything looked healthy. Turns out Vercel cron sends GET requests, but we put the email logic in a POST handler. The GET handler was just a health check returning {"status":"healthy"}. Two of three cron routes had this bug - the third one happened to use GET and worked fine.

2 points | by nishiohiroshi 1 day ago

1 comments

  • stephenr 1 day ago
    I'm not sure what's more depressing about this.

    NodeJS bros recreating the "curl via http request" bullshit that was the scourge of shared hosting php 20 years ago; or

    Deploying something to production that has never been tested even once, and then pretending it's the platform hosts' fault for doing something you didn't anticipate.