Skip to content

fail-on-error set but exit code is still 0 (== SUCCESS) #1690

Open
@winren9

Description

@winren9

When I accidently set the wrong --project-id parameter and want to upload via
cdxgen --server-url $url --project-id wrongid --api-key $apiToken --fail-on-error .

then i get (enabling debug output) that the submit goes wrong:
Unable to submit the SBOM to the Dependency-Track server using POST method HTTPError: Response code 400 (Bad Request)

When i fetch the exit code via $? it is still 0, but in my opinion it should be != 0.

Should the Parameter --fail-on-error work here too?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions