pub(crate) fn sync_error(state: &AppState, err: &ProvisionError) -> ApiErrorExpand description
Maps a failure onto the error name com.atproto.sync.* declares for it.
The names in those lexicons are the ones a generated client switches on,
and they are not this server’s own: a repository nobody minted is
RepoNotFound here even though every other route calls the same condition
UnknownAccount. The status codes stay this server’s — 404 for a
repository that is not there, 400 for a CID that names nothing — because
the name is the normative half and a status that says the truth is better
than one chosen to match a framework’s default.