POST requests to /users fail - syntax error at or near ")"

Description

The following request generates a response with status-code 500:

Response:

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Checklist

hide

TestRail: Results

Activity

Show:

Hongwei Ji August 2, 2019 at 2:27 PM

Recent RMB v25 changed wrapVal() to return empty string for null, as seen in https://github.com/folio-org/raml-module-builder/blob/v25.0.0/domain-models-runtime/src/main/java/org/folio/rest/persist/Criteria/Criteria.java#L206. For this ticket, the fix was simply to maintain mod-users' old behavior even though empty username does not make practical sense.

Marc Johnson July 31, 2019 at 9:15 AM

Was this caused by trying to check for uniqueness of usernames, when a username was provided?

And if so, was the resolution to skip the check for uniqueness entirely if the user does not have a username?

Hongwei Ji July 30, 2019 at 3:57 PM

Verified with 15.7.0-SNAPSHOT.90

Hongwei Ji July 30, 2019 at 3:21 PM

Okay. I will go with the first approach to fix mod-users to allow null username just like before. Not sure about preventing malformed SQL. Tweaking CQL2PG to throw exception before PG client?

Jakub Skoczen July 30, 2019 at 3:12 PM

No breaking changes please at this point. Should there be some validation though to prevent generating malformed SQL like this?

Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Core: Platform

Fix versions

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created July 30, 2019 at 12:15 PM
Updated January 3, 2020 at 2:20 PM
Resolved July 30, 2019 at 3:57 PM
TestRail: Cases
TestRail: Runs