Strapi /auth/local api throws 500 error for wrong password or email not confirmed

I have the same issue - I am using the latest (5.13.0).

  "dependencies": {
    "@strapi/plugin-cloud": "5.13.0",
    "@strapi/plugin-graphql": "^5.12.6",
    "@strapi/plugin-users-permissions": "5.13.0",
    "@strapi/provider-email-nodemailer": "^5.13.0",
    "@strapi/strapi": "5.13.0",
    "better-sqlite3": "11.3.0",
    "fs-extra": "^10.0.0",
    "mime-types": "^2.1.27",
    "passport-google-oauth2": "^0.2.0",
    "react": "^18.0.0",
    "react-dom": "^18.0.0",
    "react-router-dom": "^6.0.0",
    "styled-components": "^6.0.0"
  },