Skip to content

feat: structured error messages#86

Merged
bordumb merged 9 commits intomainfrom
fn-65-structured-error-codes
Mar 11, 2026
Merged

feat: structured error messages#86
bordumb merged 9 commits intomainfrom
fn-65-structured-error-codes

Conversation

@bordumb
Copy link
Contributor

@bordumb bordumb commented Mar 11, 2026

No description provided.

bordumb added 9 commits March 11, 2026 22:26
Eliminates duplicate trait definitions in auths-core and auths-verifier.
Both crates now re-export from auths-crypto. CLI renderer uses single import.
Declarative macro maps error codes to include_str! markdown explanations.
10 representative error docs across E2xxx (verifier), E3xxx (core), E5xxx (sdk).
Migrates AgentError (24 codes) and TrustError (7 codes) from AUTHS_SNAKE_CASE
to AUTHS-E3xxx format. Adds AuthsErrorInfo impls to all remaining core error
types: PairingError, CryptoError, WitnessError, StorageError, NetworkError,
ResolutionError, PlatformError, SshAgentError, ConfigStoreError.
85 error codes now in registry with markdown docs.
…odes (fn-65.4)

- Add AuthsErrorInfo impls to all auths-crypto error types (E1001-E1302)
- Migrate auths-verifier AttestationError (E2001-E2018) and
  CommitVerificationError (E2101-E2109) to numeric codes
- Create xtask gen-error-docs: scans AuthsErrorInfo impls from source,
  auto-generates docs/errors/*.md and registry.rs
- Replace manually-maintained registry with fully automated generation
- Add --check mode for CI gate validation
- Migrate SetupError (E5001-E5006), DeviceError (E5101-E5104)
- Add AuthsErrorInfo for DeviceExtensionError (E5201-E5205),
  RotationError (E5301-E5306), RegistrationError (E5401-E5403),
  McpAuthError (E5501-E5504), OrgError (E5601-E5610),
  ApprovalError (E5701-E5706), SigningError (E5901-E5910)
- Migrate AllowedSignersError (E5801-E5808) from AUTHS_SNAKE_CASE
- Regenerate registry.rs and docs/errors/ via xtask (182 codes total)
- Add AuthsErrorInfo impls for 17 error types in the E4xxx range:
  FreezeError (E40xx), StorageError (E41xx), InitError (E42xx),
  AgentProvisioningError (E43xx), IdentityError (E44xx),
  ValidationError (E45xx), KelError (E46xx), RotationError (E47xx),
  ResolveError (E48xx), TenantIdError (E485x), RegistryError (E486x),
  InceptionError (E49xx), IncrementalError (E495x),
  AnchorError (E496x), WitnessIntegrationError (E497x),
  CacheError (E498x), HookError (E499x)
- Regenerate registry.rs and docs/errors/ (290 codes total)
- Replace repetitive per-type downcast branches with try_downcast! macro
- Add [AUTHS-EXXXX] code prefix to all text error output (yellow)
- Add downcast support for DeviceExtensionError, RotationError,
  RegistrationError, McpAuthError, OrgError, ApprovalError,
  AllowedSignersError, SigningError
- Both text and JSON modes now extract codes from all AuthsErrorInfo types
@bordumb bordumb self-assigned this Mar 11, 2026
@vercel
Copy link

vercel bot commented Mar 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
auths Ready Ready Preview, Comment Mar 11, 2026 11:32pm

@bordumb bordumb merged commit ff8b9d0 into main Mar 11, 2026
8 of 12 checks passed
@bordumb bordumb deleted the fn-65-structured-error-codes branch March 11, 2026 23:32
@github-actions
Copy link

Auths Commit Verification

Commit Status Details
4a8e1b41 ❌ Failed No signature found
fd8d72de ❌ Failed No signature found
d00a41e9 ❌ Failed No signature found
cd0bf2ee ❌ Failed No signature found
f5c1a94e ❌ Failed No signature found
94f2be40 ❌ Failed No signature found
6e2eb315 ❌ Failed No signature found
4119ffed ❌ Failed No signature found
dbdfd42d ❌ Failed No signature found

Result: ❌ 0/9 commits verified


How to fix

Commit 4a8e1b41 is not signed. Install auths and re-sign:

macOS: brew install auths
Linux: Download from releases

Then re-sign:

git rebase HEAD~9 --exec 'git commit --amend --no-edit -S'
git push --force-with-lease

Quickstart →

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.

1 participant