Skip to content

Commit dbcf925

Browse files
server: propagate errors from remove_subgraph in graphman GraphQL resolver
Add missing .map_err(GraphmanError::from) to properly convert store errors (including the new SubgraphNotFound) to GraphQL errors. Signed-off-by: Maksim Dimitrov <dimitrov.maksim@gmail.com>
1 parent 528fe35 commit dbcf925

File tree

1 file changed

+4
-1
lines changed
  • server/graphman/src/resolvers/deployment_mutation

1 file changed

+4
-1
lines changed

server/graphman/src/resolvers/deployment_mutation/remove.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ pub async fn run(ctx: &GraphmanContext, name: &String) -> Result<()> {
2424
}
2525
};
2626

27-
let changes = catalog_conn.remove_subgraph(name).await?;
27+
let changes = catalog_conn
28+
.remove_subgraph(name)
29+
.await
30+
.map_err(GraphmanError::from)?;
2831
catalog_conn
2932
.send_store_event(&ctx.notification_sender, &StoreEvent::new(changes))
3033
.await?;

0 commit comments

Comments
 (0)