Introduction
When trying to persist a custom issue by the JFrog Xray API, the server responds with a 500 Internal Server Error.
Root Cause
The id field for a custom vulnerability issue in JFrog Xray has a strict character length limit of 32 characters. If the provided id exceeds this limit, it will cause a database insertion failure.
And you can see the error message in the xray-server-service.log:
Resolution
Ensure that the id field in your API payload does not exceed 32 characters. For example:
Original Payload:
"id": "CustomIssue_rhOUogrEA0IEz8NPxxxxxxxx"
Corrected Payload:
"id": "CustomIssue_rhOUogrEA0IEz8NP" // Total <= 32 characters