ReviewOS

also looking at this

craft-native/craft

fix(ios): report async pool exhaustion as busy

#267
Merged glennmichael123 wants to merge codex/ios-busy-error-code into main
19 files +53 -65
packages/zig/src/bridge_mobile_contacts.zigmodified+2-5
Changes to packages/zig/src/bridge_mobile_contacts.zig
@@ -343,16 +343,13 @@ pub const ContactsBridge = struct {
343343 }
344344};
345345
346/// The answer for a full block pool, copied from `bridge_mobile_location` and
347/// the picker: `BridgeError` has no "Busy", `INVALID_PARAMETER` is the
348/// migration notes' designated stand-in, and the point is that the caller gets
349/// an explicit rejection instead of a promise that never settles.
346/// Reject a call when every asynchronous reply slot is already in use.
350347fn poolFull(action: []const u8) bridge_error.BridgeError {
351348 std.log.warn(
352349 "{s} refused: all {d} async slots are in flight",
353350 .{ action, ios_async.max_in_flight },
354351 );
355 return bridge_error.BridgeError.InvalidParameter;
352 return bridge_error.BridgeError.Busy;
356353}
357354
358355// =============================================================================