dependency-track icon indicating copy to clipboard operation
dependency-track copied to clipboard

No error when BOM upload fails due to PURL address size limit exceeding

Open eugenhoffmann opened this issue 8 months ago • 1 comments

Current Behavior

When uploading a BOM file containing PURL addresses that exceed the 786-characters limit, the upload fails and is logged as an error.

stack_trace: javax.jdo.JDOFatalUserException: Attempt to store value "..." in column ""PURL"" that has maximum length of 786. Please correct your data!

However, the message "BOM uploaded" can be misleading, as it suggests that the BOM upload was successful. When using the /v1/bom REST API, a success status code (200) is returned without any error message, which can cause confusion.

Steps to Reproduce

  • Upload the BOM file via GUI large_purl.json. Project - Tab Components - Upload BOM
  • Upload the BOM file large_purl.json file using the /v1/bom REST API

Expected Behavior

Return an error message indicating that the PURL addresses exceed the 786-character limit

Dependency-Track Version

4.11.4

Dependency-Track Distribution

Container Image

Database Server

PostgreSQL

Database Server Version

15.5

Browser

Google Chrome

Checklist

eugenhoffmann avatar Jun 24 '24 12:06 eugenhoffmann