prestodb/presto

Incorrect HTTP response code 500 is returned when the password is too long

Open

#25,679 opened on Aug 4, 2025

View on GitHub
 (4 comments) (0 reactions) (0 assignees)Java (5,240 forks)batch import
buggood first issue

Repository metrics

Stars
 (15,558 stars)
PR merge metrics
 (Avg merge 34d 14h) (120 merged PRs in 30d)

Description

When file-based authentication is enabled, and the password is too long, the server responds with HTTP 500, not the expected HTTP 401

Your Environment

  • Presto version used: 0.294-SNAPSHOT
  • Storage (HDFS/S3/GCS..):
  • Data source and connector used:
  • Deployment (Cloud or On-prem): on-prem with Docker Swarm
  • Pastebin link to the complete debug logs: https://pastebin.com/SvU1KCpQ

Expected Behavior

The server should return HTTP 401.

Current Behavior

The server should return HTTP 401.

Possible Solution

Catch the RuntimeException and wrap it into a PrestoException.

Steps to Reproduce

Screenshots (if appropriate)

Context

Contributor guide