DependencyTrack / DependencyTrack/dependency-track
No error when BOM upload fails due to PURL address size limit exceeding
- Dominant language
- Java
- Stars
- 4.2k
- Forks
- 811
- Avg merge
- 8h 39m
- Merged PRs (30d)
- 237
Description
### 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](https://github.com/user-attachments/files/15955025/large_purl.json). Project - Tab Components - Upload BOM
- Upload the BOM file [large_purl.json](https://github.com/user-attachments/files/15955025/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
- [X] I have read and understand the [contributing guidelines](https://github.com/DependencyTrack/dependency-track/blob/master/CONTRIBUTING.md#filing-issues)
- [X] I have checked the [existing issues](https://github.com/DependencyTrack/dependency-track/issues) for whether this defect was already reported
Contributor guide
Assessment
This issue has not been assessed yet.