Reference

Error Codes

Complete list of error codes with causes and resolutions. Error codes are stable and can be used for programmatic error handling.

Programmatic access: Use errors.CodeOf(err) in Go to extract the error code from wrapped errors.

Integrity Errors

E001 DIGEST_MISMATCH
errors.DigestMismatch

CLI Message: digest mismatch for <path>

Cause: The file's content doesn't match the digest recorded in the manifest.

Resolution: Either rebuild the pack with the current files, or restore the original file content.

E002 MANIFEST_INVALID
errors.ManifestInvalid

CLI Message: invalid manifest: <details>

Cause: The manifest.json is malformed or doesn't conform to the schema.

Resolution: Check the manifest JSON syntax. Rebuild the pack if corrupted.

E003 ARTIFACT_MISSING
errors.ArtifactMissing

CLI Message: artifact not found: <path>

Cause: The manifest references a file that doesn't exist in the pack.

Resolution: The pack may be corrupted. Obtain a fresh copy.

E004 PACK_CORRUPT
errors.PackCorrupt

CLI Message: pack is corrupt or not a valid ZIP

Cause: The .epack file is not a valid ZIP archive.

Resolution: The file was corrupted during transfer. Re-download or rebuild.

Signature Errors

E010 SIGNATURE_INVALID
errors.SignatureInvalid

CLI Message: signature verification failed

Cause: The cryptographic signature doesn't validate against the manifest.

Resolution: The pack may have been modified after signing. Obtain a fresh signed copy.

E011 IDENTITY_MISMATCH
errors.IdentityMismatch

CLI Message: identity mismatch: expected <subject>, got <actual>

Cause: The signer identity doesn't match your --subject or --issuer constraint.

Resolution: Check who signed the pack with epack inspect. Update your constraints or have the correct identity re-sign.

E012 NO_ATTESTATION
errors.NoAttestation

CLI Message: pack has no attestations

Cause: --require-attestation was specified but the pack is unsigned.

Resolution: Sign the pack with epack sign, or remove the --require-attestation flag.

E013 ATTESTATION_EXPIRED
errors.AttestationExpired

CLI Message: attestation certificate has expired

Cause: The Sigstore certificate used to sign the pack has expired and the timestamp is outside the validity window.

Resolution: Re-sign the pack with a fresh certificate.

Build Errors

E020 NO_ARTIFACTS
errors.NoArtifacts

CLI Message: no artifacts to package

Cause: The glob pattern didn't match any files.

Resolution: Check your file paths and glob patterns. Use quotes to prevent shell expansion.

E021 FILE_TOO_LARGE
errors.FileTooLarge

CLI Message: file exceeds maximum size: <path>

Cause: Individual files are limited to 100MB by default.

Resolution: Compress large files, split them, or use --max-file-size to increase the limit.

E022 STREAM_INVALID
errors.StreamInvalid

CLI Message: invalid stream identifier: <stream>

Cause: The stream name doesn't match the required format.

Resolution: Use format org/name or org/name/env. Alphanumeric, hyphens, and slashes only.

Collector Errors (Full Edition)

E030 COLLECTOR_TIMEOUT
errors.CollectorTimeout

CLI Message: collector '<name>' timed out after <duration>

Cause: The collector didn't complete within the timeout period.

Resolution: Increase timeout with --timeout, check network connectivity, verify API credentials.

E031 SECRET_MISSING
errors.SecretMissing

CLI Message: required secret '<name>' not found in environment

Cause: A required environment variable is not set.

Resolution: Set the environment variable before running epack (for example: source .env && epack collect).

E032 LOCKFILE_MISMATCH
errors.LockfileMismatch

CLI Message: lockfile mismatch: run 'epack lock' to update

Cause: --frozen was specified but the lockfile doesn't match dependencies.

Resolution: Run epack lock locally and commit the updated lockfile.

Exit Codes

Exit codes are divided into general codes (0-9) and component-specific codes (10-19).

General Exit Codes

Code Meaning
0 Success
1 General error (invalid input, runtime error, etc.)
2 Malformed pack (pack cannot be opened or parsed)

Component Exit Codes (10-19)

Code Meaning
10 Lock invalid (lockfile missing, invalid, or mismatched)
11 Digest mismatch (binary/artifact digest doesn't match expected)
12 Signature mismatch (Sigstore signature verification failed)
13 Timeout (operation timed out)
14 Missing binary (required binary not found/installed)
15 Network error (network error during fetch)

See Also