mirror of
https://github.com/Komediruzecki/token-circles.git
synced 2026-10-20 09:46:43 +02:00
getProfileId/getProfileIds threw plain Errors carrying a statusCode, but the first error handler only maps AppError, so they surfaced as HTTP 500 instead of 401/403. Throw UnauthorizedError / AppError(403) so the status codes are right. Also normalize a trailing slash in the auth gate so /api/auth/login/ is still treated as public, and remove the now-unused toCamelCase import in portfolio.js.