diff --git a/CHANGELOG.md b/CHANGELOG.md index aa325609..9a5cb054 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ If you are upgrading from v0.16.x, replace the binary (or run `docker pull`). If - JMAP: - Patching ids containing digits in JSON Pointers failes. - Patching nested objects with `null` values fails. +- SQL directory: Return `Failed` instead of `Error` when the query returns no results. ## [0.16.4] - 2026-05-05 diff --git a/crates/directory/src/backend/sql/lookup.rs b/crates/directory/src/backend/sql/lookup.rs index 31c1bfc6..bab6c9af 100644 --- a/crates/directory/src/backend/sql/lookup.rs +++ b/crates/directory/src/backend/sql/lookup.rs @@ -29,7 +29,7 @@ impl SqlDirectory { .await .caused_by(trc::location!())?, ) else { - return Err(trc::AuthEvent::Error + return Err(trc::AuthEvent::Failed .into_err() .details("SQL login query did not return an account") .ctx(trc::Key::AccountName, username.to_string()));