Skip to content

fix(trust-graph): return explicit score lookup errors#96

Merged
EfeDurmaz16 merged 1 commit into
mainfrom
fides-trust-score-not-found-contract
May 6, 2026
Merged

fix(trust-graph): return explicit score lookup errors#96
EfeDurmaz16 merged 1 commit into
mainfrom
fides-trust-score-not-found-contract

Conversation

@EfeDurmaz16

Copy link
Copy Markdown
Owner

Summary

  • resolve score and capability score DIDs before cache writes
  • return 404 for identities missing from discovery and 503 for discovery outages
  • document the score lookup error contract in the trust-graph OpenAPI spec

Verification

  • pnpm --filter @fides/trust-graph test
  • pnpm --filter @fides/trust-graph lint
  • pnpm build
  • git diff --check

@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

} else if (response.status >= 500) {
throw new TrustError(`Discovery service unavailable while resolving identity: ${did}`)
}
} catch (error) {
if (error instanceof TrustError) throw error

P2 Badge Count HTTP 5xx responses in the breaker

When discovery responds with HTTP 5xx, line 317 throws a TrustError, but the catch immediately rethrows TrustError before incrementing failureCount, so repeated HTTP outages never open the circuit breaker; only network/abort exceptions do. This defeats the breaker for the common unavailable-service response path that this change now maps to 503.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@EfeDurmaz16 EfeDurmaz16 merged commit 7b9d1e0 into main May 6, 2026
9 checks passed
@EfeDurmaz16 EfeDurmaz16 deleted the fides-trust-score-not-found-contract branch May 6, 2026 17:51
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.

2 participants