Skip to content

feat(referrer): improve referrer not found error message #2702

Open
Piskoo wants to merge 2 commits intochainloop-dev:mainfrom
Piskoo:pfm-4376
Open

feat(referrer): improve referrer not found error message #2702
Piskoo wants to merge 2 commits intochainloop-dev:mainfrom
Piskoo:pfm-4376

Conversation

@Piskoo
Copy link
Collaborator

@Piskoo Piskoo commented Feb 3, 2026

This PR improves the error message when a referrer (artifact/evidence) can't be found during attestation operations.

Closes #2701

Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
@Piskoo Piskoo marked this pull request as ready for review February 3, 2026 14:30
Copy link
Member

@migmartri migmartri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure you are solving the error in the right place, you seem to be doing it at save.

Could you put examples of running the commands before and after?

Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
@Piskoo
Copy link
Collaborator Author

Piskoo commented Feb 4, 2026

I am not sure you are solving the error in the right place, you seem to be doing it at save.

Could you put examples of running the commands before and after?

Sorry, you are right, it comes from the endpoint used by our builtin chainloop.evidence() rego rule.

$ chainloop att add --value sbom.json
WRN API contacted in insecure mode
INF uploading sbom.json - sha256:bfbb8312c63447567e65f128ac05ddaebf562d072532b37fb412f47bfc32a421
ERR referrer not found
exit status 1

$ chainloop att add --value sbom.json
WRN API contacted in insecure mode
INF uploading sbom.json - sha256:bfbb8312c63447567e65f128ac05ddaebf562d072532b37fb412f47bfc32a421
ERR artifact or piece of evidence with digest sha256:bfbb8312c63447567e65f128ac05ddaebf562d072532b37fb412f47bfc32a421 not found
exit status 1

@Piskoo Piskoo requested a review from migmartri February 4, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve referrer error message to include digest and artifact type

2 participants