MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / resolve

Method resolve

crates/client-api/src/util.rs:110–115  ·  view source on GitHub ↗

A variant of [`Self::try_resolve()`] which maps to a 404 (Not Found) response if `self` is a [`NameOrIdentity::Name`] for which no corresponding [`Identity`] is found in the SpacetimeDB DNS.

(&self, ctx: &(impl ControlStateReadAccess + ?Sized))

Source from the content-addressed store, hash-verified

108 /// response if `self` is a [`NameOrIdentity::Name`] for which no
109 /// corresponding [`Identity`] is found in the SpacetimeDB DNS.
110 pub async fn resolve(&self, ctx: &(impl ControlStateReadAccess + ?Sized)) -> axum::response::Result<Identity> {
111 self.try_resolve(ctx)
112 .await
113 .map_err(log_and_500)?
114 .map_err(|name| (StatusCode::NOT_FOUND, format!("`{name}` not found")).into())
115 }
116
117 /// If `self` is a [`NameOrIdentity::Name`], looks up the name in the
118 /// namespace registry (also known as "top level domain") and returns the

Callers 15

reformat_update_v1Function · 0.45
reformat_query_rowsFunction · 0.45
handle_websocketFunction · 0.45
find_leader_and_databaseFunction · 0.45
db_infoFunction · 0.45
logsFunction · 0.45
get_identityFunction · 0.45
get_namesFunction · 0.45
resetFunction · 0.45
publishFunction · 0.45
resolve_and_authenticateFunction · 0.45

Calls 1

try_resolveMethod · 0.80

Tested by

no test coverage detected