Skip to main content

Return codes

A refused command carries a return code. The web screens show the message. The RF terminal and the API show the code too. This page lists the codes that the adjustment, count and move commands use, in plain words, and the stable line codes that name why an adjustment line or a count was refused. For the receiving codes see Inbound: Return codes.

Return codes of adjustments and counts​

Source: crates/libs/wms-inventory/src/service/inventory_adjustment/error.rs:75-105 and crates/libs/wms-inventory/src/service/inventory_count/error.rs:55-95. Every other refusal has code 0 and a message.

CodeClassMeaningWhere you meet it
0Hard failA business refusal with a message. For counts the stable name is in context.code. For a refused post the lines are in context.lines.Every task page.
40RetryThe version you read is out of date. The answer holds current_state (version, status).Approving, Posting, Deleting, Accepting a variance, Recounting, Cancelling a count. Read the document again and decide again.
41RetryStock of an adjusted identity appeared while Post was locking. Nothing was written.Posting an adjustment. Post again.
42Hard failThe same request key was used for a different request.The API. Make a new request.
44RetryThe same request is still being processed.The API. Retry with the same key.
70Hard failThe status of the document does not allow the command. For adjustments: not validated, needs approval, posted, no lines, not posted, already reversed. For counts: the count is not open, the location is not open or has no variance, the location was counted, the count has counts.Every task page. See Statuses.

None of these refusals can be overridden (is_overridable is false).

Adjustment line codes​

A refused line stores one of these in error_code, and the post names them in context.lines. The messages and the cause of each are in Validating an adjustment.

INVALID_TARGET_QTY, DUPLICATE_IDENTITY, INVENTORY_IDENTITY_GONE, BELOW_RESERVED_QTY, STOCK_CHANGED_SINCE_COUNT, DUPLICATE_DOCUMENT_IDENTITY, SERIAL_TRACKED_NOT_SUPPORTED, LOT_UNKNOWN, LOCATION_REFUSES_STOCK, LOCATION_IN_TRANSIT, CONTAINER_STANDS_ELSEWHERE, CONTAINER_HELD_BY_PICKING, REASON_UNKNOWN, REASON_INACTIVE, REASON_FORBIDS_INCREASE, REASON_FORBIDS_DECREASE, REASON_REQUIRES_COMMENT.

Count codes​

Each count refusal names itself in context.code. Source: crates/libs/wms-inventory/src/domain/inventory_count/aggregate.rs (CountRefusal). Return code 70 is marked.

CodeReturn codeMessageMeaning
COUNT_NOT_OPEN70the count is {status}, not openThe count is closed or cancelled.
COUNT_TASK_NOT_OPEN70the count of {location} is {status}: it is not being countedThe location row is not Open.
COUNT_NO_VARIANCE70the count of {location} is {status}: there is no variance to decideAccept or recount on a row that is not a variance.
COUNT_TASK_COUNTED70{location} has been counted: it stays in the count — accept, recount or cancelRemove on a counted row.
COUNT_HAS_COUNTS70count {number} has been counted: it is cancelled, not deletedDelete on a count with counts.
COUNT_CONFIRMED_EMPTY0{location} was confirmed empty: nothing more can be recorded in itRF.
COUNT_NOT_EMPTY0{location} holds counted stock, so it cannot be confirmed emptyRF.
COUNT_NOTHING_COUNTED0nothing was counted in {location}: record what is there, or confirm that it is emptyRF: "Done" with nothing recorded.
COUNT_SAME_COUNTER0a recount of {location} is counted by somebody other than the first counterRF.
COUNT_NOTHING_TO_COUNT0{location} is not being countedRF: a location nobody counts.
COUNT_RECOUNT_LIMIT0{location} has been recounted {n} time(s), the most this count allows: accept the variance or cancel the countRecounting a location.
COUNT_NO_LOCATIONS0a count needs at least one locationStart by API with no location.
COUNT_STOCK_MOVED_PAST_COUNT0more stock left {location} after it was counted than the count found there: recount itA soft count.
COUNT_NOT_STARTED_BY_HAND0a {kind} count is made by its policy or event, not started by handCreating a count.
COUNT_NOTHING_CHOSEN0choose the locations or the zones to addAdding locations.
COUNT_LOCATION_ALREADY_IN0already in this count: {codes}
COUNT_SCOPE_EMPTY0nothing can be counted in {scope}: every location is blocked or already being counted
COUNT_LOCATION_BUSY0already being counted: {codes}Another count holds the location.
COUNT_LOCATION_NOT_COUNTABLE0cannot be frozen for a count (unknown, blocked or under another operation): {codes}
COUNT_LOCATION_NEVER_COUNTED0never counted (lost stock or open pick pallets): {codes}
COUNT_LOCATION_TYPE_NEVER_COUNTED0location type {type} is never countedA cycle-count policy.
COUNT_INVALID_QTY0quantity {qty} is not a positive numberRF.
COUNT_UNKNOWN_SKU0SKU {code} does not exist for this ownerRF.
COUNT_AMBIGUOUS_OWNER0SKU {code} belongs to several owners: name the ownerRF.
COUNT_UNKNOWN_OWNER0no owner {code}RF.
COUNT_UNKNOWN_CONTAINER0no container {code}
COUNT_UNKNOWN_LOT0lot {lot} is not a lot of {sku}: F2 on Lot finds a lot by its attributesRF.
COUNT_NO_UNIT0SKU {code} has no default unit: name the unitRF.
COUNT_POLICY_WITHOUT_SCOPE, COUNT_POLICY_WITHOUT_ITEM_SCOPE, COUNT_POLICY_MIXED_SCOPE, COUNT_POLICY_CODE_TAKEN, COUNT_POLICY_INACTIVE0Cycle-count policies.Not described in this section.
COUNT_TASK_NOT_GIVEN0{location} is not given to you: take your next locationRF.
COUNT_TASK_HELD0{location} is being counted by {holder}RF.
COUNT_NOTHING_TO_TAKE0nothing to count or nothing to count in area {area}RF.
COUNT_UNKNOWN_WORK_AREA0no work area {code}RF.
COUNT_OUTSIDE_ITEMS0this count counts only {item}: {sku} lot {lot} is not part of itRF, count of the item only.
COUNT_ITEM_NOT_SELECTIVE0only a selective or a cycle count is counted by item
COUNT_SUBSET_WITHOUT_ITEM0a count of the item only needs the item: name SKUs, lots or LPNs
COUNT_CAUSE_REQUIRED0say why the count differs: choose a cause ("Not established" if nobody knows)Accepting a variance with no cause.
COUNT_CAUSE_NOT_OFFERED0{code} is not a cause you can chooseThe cause is unknown, switched off, or the system's own WITHIN_TOLERANCE.
COUNT_VARIANCE_ABOVE_LIMIT0this variance is worth {value}, more than the {limit} you may accept: a manager accepts itAbove Manager above (value) of the count tolerances, without inventory_count.accept_large_variance.
COUNT_NOT_WITHIN_TOLERANCE0this variance is not within the count tolerance: a supervisor decides itThe accept on its own found the tolerance changed. The row stays Variance.
COUNT_INVALID_INPUT0A free message (comment too long, recounts out of range, number too long).

A variance that the adjustment refuses is answered with the variance cannot be adjusted: ..., and carries the lines of the adjustment in context.lines.

Move codes​

A refused move uses its own code space, 80 to 99, which overlaps the serial codes of the receiving section (80 SerialNotFound and so on). Read a code together with the method that answered. For move_execute (crates/libs/wms-inventory/src/movement/types.rs:252-288):

CodeMeaningOverridable
80The source container has a hold that is on.Yes, when the hold code is overridable.
81The source location has a flag. Retired: never raised.
82The destination location has a flag. Retired: never raised.
83The source location has a covering hold.Yes, when the hold code is overridable.
84The destination location has a covering hold.Yes, when the hold code is overridable.
85A directed putaway landed at a location other than the suggested one (a soft rule refused it).Yes (a deviation).
86A serial capture is not finished, so this kind of move is unsafe.No.

A move failure carries is_overridable and the list of (code, subject) pairs in context.pairs. The Move stock document raises one supervisor prompt for the whole list. See Move stock.