Skip to main content

Return codes

A refused order command carries a return code. The web screens show the message. The API shows the code too. This page lists the codes that the order commands use. The order commands are shipment_order_*, pick_detail_delete and the line commands. Source: crates/libs/wms-outbound/src/error.rs:88-130 (function to_rf_envelope).

The codes are shared with the receiving commands. The other codes of Inbound return codes do not occur here.

CodeClassNameMeaningWhere you meet it
40RetryVersion conflictThe order or the line changed after you read it. The answer carries the current version and status (current_state).Release, Allocate, Unallocate repair their screen copy and ask you to press again (Order data was updated (now {status}) — the form has been refreshed, please retry). Save, Cancel Qty and the line commands show the error.
41RetryLock timeout, or contentionAnother operation holds the order (order is locked by another operation (waited {ms}ms)), or reserved stock was locked by another transaction (allocation still has {qty} units deferred by inventory lock contention).Any command. Try again in a moment.
42Hard failIdempotency conflictA request key was used again with a different request.API callers. The web screens make a fresh key for each press.
44RetryIdempotency in progressThe first run of the same key is still working.API callers. Send the same request again with the same key.
70Hard failInvalid transitionThe status does not allow this action. Message form: cannot {action} an order in status {status}.Release (release, release again), Cancel (cancel), Unallocate (cancel_allocation), Delete Selected (delete a reservation from), Allocate (allocate), close (close).
0Hard failBusiness refusalAny other rule. The message says which.Everywhere. See the Messages catalogue.

Facts about all of them:

  • None of them can be overridden by a supervisor. The answer always says is_overridable: false. There is no override for releasing an invalid order.
  • Code 40 is the only one that carries data to repair the screen.

Not confirmed by code: the numbers 41, 42 and 44 as seen on the web screens. They are in the answer of the API. The web screens show only the message text. To verify: send shipment_order_update twice with one key and different data, and read the second answer (it should carry 42).