fix(cli): handle 413 payload-too-large errors for SBOM scans#545
Merged
facundo-herodevs merged 1 commit intomainfrom Apr 15, 2026
Merged
fix(cli): handle 413 payload-too-large errors for SBOM scans#545facundo-herodevs merged 1 commit intomainfrom
facundo-herodevs merged 1 commit intomainfrom
Conversation
v3nant
approved these changes
Apr 15, 2026
jeremymwells
approved these changes
Apr 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes https://github.com/neverendingsupport/data-and-integrations/issues/742
What This Branch Does
This branch adds explicit oversized-upload handling to the SBOM scan flow so
413 Request Entity Too Largeresponses no longer fall back to generic scan failures. It propagates the error fromcreateAuthorizedFetchthroughSbomScannerand shows the right user-facing message fromScanEol.scanSbomdepending on whether the SBOM came from--fileor was generated locally.413 Error Propagation
createAuthorizedFetchinsrc/api/apollo.client.tsto convert raw413responses intoApiErrorinstances, including the retry path after a401token refresh.ApiErrorCodeinsrc/api/errors.tswithPAYLOAD_TOO_LARGE_ERROR_CODEand aligns the other API error codes behind exported constants.ApiErrorvalues insideSbomScannerinsrc/api/nes.client.ts, so the command layer can distinguish oversized uploads from generic GraphQL failures.CLI Scan Messaging
413branch insideScanEol.scanSbominsrc/commands/scan/eol.tsso scans fail with a specific oversized-upload message before falling back to the existing auth/general error mapping.ScanEol.getPayloadTooLargeMessage, which returns the--filemessage for user-supplied SBOMs and the smaller-scope guidance for generated SBOMs.ScanEol.scanSbom, soCLI EOL Scan Failedstill records the API error code and scan timing when the server rejects the upload.Examples