[MODSET-11] When CQL is rejected, the resulting 400 Bad Request contains no information Created: 18/Nov/23  Updated: 20/Nov/23  Resolved: 18/Nov/23

Status: Closed
Project: mod-settings
Components: None
Affects versions: None
Fix versions: None

Type: Bug Priority: TBD
Reporter: Mike Taylor Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Issue links:
Relates
relates to VERTXLIB-53 CQL containing double quotes is rejected Closed
Sprint:
Development Team: None
RCA Group: TBD

 Description   

Submitting a query like key=="dbinfo" to mod-settings results in rejection — seeingly because of the double quotes around the query term, see VERTXLIB-53 Closed — but the problem with parsing is not communicated to the client. The WSAPI request is rejected with HTTP status 400 Bad Request, but there is no meaningful additional information in the content of the response — only a restatement of the "400 Bad Request" formatted in HTML.

To reproduce:

$ curl -H 'X-Okapi-Token: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJkaWt1X2FkbWluIiwidHlwZSI6ImxlZ2FjeS1hY2Nlc3MiLCJ1c2VyX2lkIjoiZDM0MTUwOWItMDRhNy01ZGZiLWJiMDEtODhhZGQxMTE3MDMyIiwiaWF0IjoxNzAwMjk4NDU5LCJ0ZW5hbnQiOiJkaWt1In0.7Ga1uUpGhIWS8pagOY7Row0w6qvzQo6r23Hz55nMo7g' -X 'GET' -d '' -H 'X-Okapi-Tenant: diku' 'https://folio-snapshot-okapi.dev.folio.org/ldp/config?query=key=="dbinfo"'
<!doctype html><html lang="en"><head><title>HTTP Status 400 – Bad Request</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 400 – Bad Request</h1></body></html>


 Comments   
Comment by Mike Taylor [ 18/Nov/23 ]

Haha, that was total nonsense! I was sending to query to /ldp/config, not /settings/entries! That means the problems were in mod-ldp, not mod-settings — and mod-ldp does not even claim to support CQL!

I will close this issues as invalid. Sorry to have wasted everyone’s time.

Comment by Charlotte Whitt [ 20/Nov/23 ]

No worries

Generated at Thu Feb 08 22:31:12 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.