You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error reporting: one HTTP status table, variable names in plan errors, plan errors before the stream's head #2085
A handful of places where an error is raised, classified or worded by a different path than the one that should own it, so the same failure can come out differently depending on the route or the moment.
One HTTP status table. The server maps errors to statuses in ServerError::status_code (fluree-db-server/src/error.rs) and never consults ApiError::status_code (fluree-db-api/src/error.rs), so the two can disagree: every ApiError::Transact(_) without its own server arm is a 400 on direct routes, whatever the API table says, while the consensus path flattens through ApiError::status_code. So one error can carry different statuses on different routes. Derive one table from the other, or add a test that they agree for every variant.
A plan-time error on the stream arrives after the head record. Since fix(query): evaluate grouped SELECT expressions once per group #2006 the grouped reads are checked before the head, but any other plan-time error still comes after the 200 has gone out. Building the plan before the 200 would close the class, but it moves reasoning and planning ahead of the response, which is a latency trade-off I'd rather decide on its own. Needs a decision.
SHACL sh:select skips SPARQL validation. A shape's query never goes through the SPARQL validator's checks (V4 and the rest), so a malformed shape surfaces only when it's planned, as a plan error, instead of as the validator's named error.
From #2006 (Follow-ups: sh:select and the SPARQL validator; plan errors that print variable ids; the stream's plan-time error) and #2009 (Follow-ups: one HTTP status table).
One more row for the table, found while reviewing the vector-length PR: TransactError::Core isn't special-cased, so on the transact path it falls through to the generic 400 arm (fluree-db-api/src/error.rs:740), whatever its cause.
That includes failures that come from process state rather than the request, e.g. a write refused because the ledger's index failed to load. A 400 tells a client to drop the write, when retrying after the server recovers would succeed. On Raft the commit worker then treats that 400 as malformed input and answers 422. Solo, which classifies by error type rather than status, treats the same error as transient and redelivers, so today db's status and solo's handling disagree for this class.
The fix is a mapping decision for the whole class, not one error: split Core into the request-caused cases (fuel exhausted, limits) that should stay 4xx and the state-caused ones that should be 5xx, and keep solo's classifier in lockstep.
Activity
aaj3f commentedon Oct 13, 2026
One more row for the table, found while reviewing the vector-length PR:
TransactError::Coreisn't special-cased, so on the transact path it falls through to the generic 400 arm (fluree-db-api/src/error.rs:740), whatever its cause.That includes failures that come from process state rather than the request, e.g. a write refused because the ledger's index failed to load. A 400 tells a client to drop the write, when retrying after the server recovers would succeed. On Raft the commit worker then treats that 400 as malformed input and answers 422. Solo, which classifies by error type rather than status, treats the same error as transient and redelivers, so today db's status and solo's handling disagree for this class.
The fix is a mapping decision for the whole class, not one error: split
Coreinto the request-caused cases (fuel exhausted, limits) that should stay 4xx and the state-caused ones that should be 5xx, and keep solo's classifier in lockstep.