Exit codes
Some commands get a 403 from Emporix that refuses their input rather than the
credential, such as
orders transition to a status the order can’t take. These exit
with 1 and show Emporix’s message, unless the message names a scope or permission.
Their help says so.Errors
Errors start withError: and go to standard error. When Emporix answers with JSON, epx
shows its message, its error code, and the details of each field, and nothing else of the
response:
epx --help.
Retries
epx retries a request, up to three times in total, only when it can’t change data twice:- Any request after 429 Too Many Requests, honoring
Retry-Afterup to 30 seconds. - Any request whose connection couldn’t be made, unless making it timed out.
- Reads, never writes, after 502, 503, or 504.
Script examples
Check whether a product exists
Handle a conflict
Fail early on a missing scope
Run in CI
EMPORIX_ variables from your CI system’s secrets. Profiles keep their
client secret in an OS keychain, which CI runners usually don’t have. See
Authenticate.