Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Have HTTP 4xx instead of 5xx on SQL syntax error

Đang mở
#10,615 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
postgresql, python
Lĩnh vực
api, database

Hướng nghiên cứu

The payload names no source files, so start by reproducing: run a query with a SQL syntax error in the pgAdmin Query Tool and note the HTTP status returned (500) and the JSON body. Then find where the server converts PostgreSQL errors into HTTP responses, and check how the linked upstream issue #9872 handled similar errors. Done means a syntax error returns a 4xx status such as 400 with the same JSON body, and other server errors keep their current status.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Feature

Describe the solution you'd like

Hi,

I create this ticket to follow https://github.com/pgadmin-org/pgadmin4/issues/9872, I'm in case of a corporate IT infra where proxy security cannot be changed and this last replace JSON body response for request whose response code is HTTP 5xx by a proxy specific response.
The security reason is to avoid potentiel technical leak from backend.
In addition in a Rest API design, it is not semantically correct to have a HTTP 500 when pgadmin user enter an incorrect SQL request, a HTTP 400 Bad Request should be more appropriate.

Describe alternatives you've considered

The alternative should be to have pgadmin server answer HTTP 400 Bad Request code and pgadmin webapp interpret JSON as before.

Ngôn ngữ chính
Python
Star
3.9k
Fork
914
Merge trung bình
1 ngày 11 giờ
Pull request đã merge (30 ngày)
37

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của pgadmin-org/pgadmin4

Tất cả issue của pgadmin-org/pgadmin4

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.