playing-with-numbers-node icon indicating copy to clipboard operation
playing-with-numbers-node copied to clipboard

Leap Year endpoint crashes on valid input

Open YuvalG724 opened this issue 1 month ago • 0 comments
trafficstars

Bug: The /leap_year POST endpoint crashes when sending a valid year in JSON.

Steps to Reproduce:

  1. Run the server: node app.js
  2. Send POST request: { "number": 2024 }
  3. Observe server crash

Expected Behavior: The server should respond with: { "message": "The given year is a leap year" }

Actual Behavior: The server throws an error: TypeError: res.status is not a function

YuvalG724 avatar Sep 21 '25 19:09 YuvalG724