Queued create of a farmer role (IE_ROLE_MAP POST via IERoleMapWorker), created by BridgeSyncHelper when a farmer is added/edited with roles; depends on the farmer create. isActive is forced true and iE.aliasId set from appMillMetadata. IERoleMapPostRH saves the returned ids (role map id, IE/person/profile ids). Failures retry.
Headers
Header
Value
Notes
X-SESSIONID
<session token>
Stamped when the operation is queued (dooWithRetry) and re-set by CoreAPI at send time; refreshed on 401.
X-REQUESTID
<uuid v4>
Idempotency key generated by OperationManagerImpl.createOperation for POST/PUT/PATCH when the op enters the offline queue.
X-ACK-REQUESTID
<X-REQUESTID of an earlier completed op>
Added by SyncQueueProcessor for POST/PUT/PATCH: acknowledges a request id the device already saw succeed.
CoreAPI invalidates the session id and retries once immediately; if still failing the op stays in the queue (TryAgain.LATER).
500
Server error on a /gateway URL
BaseResponseHandler fetches a new session id (first 5 attempts) and returns TryAgain.LATER; retried per RetryScheduler policy (retry threshold/delay come from app config).
503
Service unavailable
CoreAPI retries once immediately, then the op is retried later by the sync queue.
any non-2xx
Any other failure
Handler onError -> TryAgain.LATER (op stays queued and is visible in Pending Sync); a row is written to the local error_log table (Sync Error Log screen) with URL, body, headers and raw response; every 10th attempt the op is mirrored to Firestore for support.