-
Notifications
You must be signed in to change notification settings - Fork 172
Closed
Description
It seems that many places uses this pattern:
let record = recorded_http_api_request!("endpoint name", id = id);
let response = {
let result = xyz_service
.operation(...)
.await?; // (1)
// (2) sometimes using _some_ explicit error mapping here, like mapping empty collections to 404
Ok(Json(result))
};
record.result(response)
Unfortunately this does not record any errors happening at (1), only explicit ones done at (2).
To make this work this either should use "IIFE" closures (as other similar feature is not yet available in stabile rust), or most probably we should just follow how this is handled in GRPC endpoints.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working