Skip to main content

Status and Error Reference

There are multiple independent status axes in NexusFlow. When judging a problem, first confirm which object the status belongs to and which field it comes from, and then interpret the status value; do not infer conclusions across objects just by seeing success, available or failed.

This page only provides "how to tell" and "what to do next." See Job, Control, and Result APIs for job control and result reading, see Report Status, Progress, and Errors for how the kernel forms the final state, see Batch Automation and Error Handling for SDK retries and partial failures, and see Simulation Job Status Reference for handling methods for ordinary users.

First Confirm Which Object the Status Belongs To​

ObjectField or SourceState CollectionAnswered Questions
simulation jobjob.statuspending、running、pausing、paused、stopping、stopped、success、faultWhich stage the calculation has reached and whether it has ended
Job result flowjob.result_statusavailable、unavailable、expiredWhether the server result stream can currently be read
Run snapshotruntime_snapshot.statussaving、available、failed、expiredWhether a copy of running status data has been saved and can be used for recovery startup
Operation and maintenance recordsoperation.statuspending、running、success、failedWhether a service action, verification or environment change is completed
Deployment recordstatus / last_deployment_status in deployment response, version list, or installation logpending、running、success、failed、rolled_backWhich stage of a package installation or deployment is recorded?
HTTP requestHTTP status code2xx、4xx、5xxWhether this request was successful at the protocol and interface processing layer
Generic business responseResponse body code0、1Whether the interface using general encapsulation reports business success
Model verification issuesissues[].severityerror、warning、infoWill a validation issue prevent the model from passing unified validation?

Statuses with the same name cannot be mixed. For example:

  • The success of the job means that the calculation ends normally, but does not mean that the result is still available;
  • The available of the result stream indicates that you can currently try to read, and the available of the running snapshot indicates that the snapshot data has been saved;
  • Use fault for job exceptions, use failed for running snapshots, operation and maintenance operations, and deployment failures;
  • stopped of the job indicates that the calculation has stopped, not "Stopped" of the service instance;
  • HTTP 200, business code: 0 and model verification valid: true are three different judgments.

Eight States of Simulation Job​

The final states are only success, fault and stopped. The same job cannot be resumed after entering the final state; when you need to modify the input or continue calculations, you should create a new job, and if necessary, select a running snapshot that is still available as the initial state.

job.statusChinese MeaningFinal StateThings to Do NowNext Steps
pendingPendingNoCan request a stop; not yet suitable for pausing, issuing component instructions, or saving running snapshotsWait briefly and refresh; check startup logs and computing resources if it obviously exceeds the usual time for similar jobs.
runningRunningNoCan pause, stop, and issue instructions supported by the kernel; can request to save running snapshotsContinue to consume status and results; do not judge whether it is finished based on the progress value only
pausingPausingNoIt can be stopped; the current job view also allows issuing instructions and requesting running snapshots, but the execution result depends on the kernel capability.Wait to enter paused, do not send pause repeatedly or resume immediately
pausedPausedNoCan resume, stop, issue instructions supported by the kernel or save running snapshotsChoose to resume or stop; it is a steady state, not a fault
stoppingStoppingNoNo more pauses, resumes, repeated stops, business instructions, or running snapshot requests are initiatedWait for stopped or fault; if convergence does not occur for a long time, check the log and have the administrator check the running instance
stoppedStoppedYesThe same job cannot be resumed; remaining logs and results can be readCheck result_status separately; create a new job if you need to continue
successCompletedYesCan no longer control the job; still retained logs and results can be readCheck the logs, business results and result_status. Do not equate success with the results being still available or the business conclusions being correct.
faultFaultYesThe same job cannot be restored; pre-failure logs and partial results may still be readableFind the first valid error first; correct the input or solution problem and then recalculate; leave platform resource issues to the administrator

Pause is a kernel optional capability. Just because the platform or SDK can send pause and resume does not mean that the current kernel must support safe pause. The control method only submits instructions and does not promise that the state has been switched when the call returns; the caller should refresh the job and wait for the target state or final state.

Three States of Result Flow​

result_status and job.status must be read separately. The current judgment is based on the active result metadata on the server and the result retention window of the completed job. The result content will not be verified one by one, and the retention time will not be extended due to the success of the job.

result_statusCurrent MeaningJudgeNext Steps
availableActivity result metadata exists, you can try to connect or read by offsetThere is no guarantee that ordinary results have been produced, that the message content can be parsed, or that the job was successful.Establish result reading with timeout; the final job should be consumed to the corresponding position of msg_num
unavailableThe activity result metadata does not exist and has not yet been determined to be expired.It is not fault, and there is no guarantee that it will be available later.Refresh once combined with the job status; check the log and result service when it continues to be unavailable during operation or the final state is still unavailable.
expiredThe server result stream for the ended job exceeds the current environment's retention window and the active result metadata no longer existsJob records and job status can continue to exist; old results will not be restored due to reconnectionStop reconnecting and check the saved data on the browser or business side; recalculate if necessary results are missing.

Common but easily misjudged combinations include:

CombinationCorrect Explanation
running + availableThe job is running and the result channel is already readable; ordinary results may not have been generated yet
fault + availableThe job failed, but the pre-failure log or some results can still be read
stopped + availableJob Stopped , the results before stopping are still within the server retention range
success + expiredThe calculation completed normally, but the server result has expired
Any job status + unavailableThe job record exists, but there is currently no activity result metadata available; it needs to be judged based on the log and time

The result retention period is determined by the current deployment configuration and cannot be hard-coded on the client. Automation should be based on the result_status and HTTP responses returned by the interface instead of inferring the job end time.

Four States of Running Snapshots​

Running snapshots save the kernel running status, not model snapshots, nor job result streams. Failure to run the snapshot will not automatically change the job to fault; even if the job is success, the running snapshot saved at the end may be failed.

runtime_snapshot.statusCurrent MeaningJudgeNext Steps
savingThe platform has registered the request and is waiting for the kernel to generate data and complete persistence.It is not a recoverable state; the end of the job does not mean that it will automatically become available.Poll within the total timeout of the caller; query again after the timeout, do not blindly submit save instructions repeatedly
availableSnapshot data savedBefore use, you still need to check whether the interface allows access and the returned expires_atIt can be used to resume and start new jobs within the validity period; it needs to be regenerated after exceeding the platform retention range.
failedThe kernel report failed, or the platform did not find the temporary data, the data exceeded the limit, or the persistence failed.It does not mean that the source job failedRead error_message; after confirming that the source job still supports saving, decide whether to create a new snapshot request
expiredThe snapshot validity period has expired and the data is no longer available for recovery.Original binary content cannot be restored by refreshing or retryingSelect another available snapshot, or rerun and generate a new snapshot

The actual validity period of the running snapshot is based on expires_at and the interface status. Do not write down the number of days. The client must set a total timeout when waiting for saving; reaching the timeout only means that the wait is over. The final status should still be queried according to the snapshot UUID before deciding whether to make up for it.

Operation and Maintenance Operations and Deployment Record Status​

These statuses are returned to the administrator through the high-privilege operation and maintenance interface, package version list, and installation log, and ordinary modeling clients usually do not need to process them. They describe operation and maintenance records, not simulation job status.

Operation and Maintenance Records​

operation.statusMeaningNext Steps
pendingThe operation record has been registered but has not been executed yet.Wait for scheduling; check the execution process and queue when it persists, and do not repeatedly submit actions with side effects
runningService action, verification or configuration application is executingCheck the operation details and target service status; if the request times out, check the record before deciding whether to retry.
successThe operation process report was successful this timeThen check whether the target service, configuration or version meets expectations; recording success does not replace running state verification.
failedOperation process report failedCheck detail and the target log to confirm whether some changes have occurred before rolling back or trying again.

Currently, common operation and maintenance actions will start directly from running, and then enter success or failed; pending is still in a legal record state, and the client should be able to display and process it.

Deployment Record​

Deployment StatusMeaningNext Steps
pendingDeployment record waiting for executionCheck scheduling and dependencies, and do not create the same deployment repeatedly
runningInstallation and subsequent verification have not yet been completedContinue to read the installation log and check the execution process; do not directly judge a long waiting time as a failure
successThe current installation process is completed and verification is completed according to this process.Continue to check actual versions, service health, and critical access paths
failedInstallation, dependency check, or post-deployment verification failedFirst confirm whether files, configurations and services have been partially changed, and then choose to repair, roll back or try again based on the logs
rolled_backThe record clearly indicates that this deployment has been rolled backCheck the restored version and service health before deciding whether to redeploy

The data model for deployment records allows for rolled_back , but currently the main asynchronous installation process usually creates running and then writes success or failed . Any failed cannot be automatically interpreted as having been rolled back; only when the record clearly returns rolled_back and the actual environment verification passes, the rollback can be considered complete.

HTTP Status Quick Check​

First determine the HTTP status, and then read the response body according to the interface contract. Don't confuse the HTTP status code with the business code.

HTTP StatusCommon Current MeaningsNext Steps
200 OKRead, update or business operation is completed; it may also just verify normal executionContinue to check the general package code, and model verification also checks data.valid
201 CreatedPartial creation interface creates resourcesSave the returned resource ID; do not assume that all created interfaces return 201
204 No ContentThe operation was successful and there was no response bodyDo not call JSON parsing; update local state according to interface contract
400 Bad RequestInvalid JSON, field, parameter, state precondition, or validation requestFix request; don't retry infinitely as is
401 UnauthorizedNo valid authentication was provided, or the access token is invalidRefresh or re-authenticate once; stop after failure, do not log in repeatedly
403 ForbiddenThe identity is valid, but there is no target resource or operation permissionCheck the account, organizational role and resource ownership; logging in again will not increase the permissions
404 Not FoundThe path or resource does not exist; some interfaces also use it to hide inaccessible resources.Check the resource type, ID, platform environment and permissions. Don’t just rely on 404 to judge that the resource has been deleted.
409 ConflictThe request conflicts with the current resource, association, or identity stateRe-read the current status and merge or replace the identifiers according to the interface requirements before proceeding.
410 GoneThe associated data has been cleaned or expiredView the response body to distinguish scenarios such as result expiration and job snapshot cleanup; usually recovery cannot be achieved by retrying
500 Internal Server ErrorAn unexpected exception occurred in the serviceRecord the request association ID, time and desensitization error text; first check whether the write operation has taken effect
503 Service UnavailableThe service or dependency is temporarily unavailableRead operations can be backed off within the total budget; write operations confirm the final status before deciding whether to retry.
504 Gateway TimeoutGateway or dependency processing timeoutIt cannot be concluded that the server has not been executed; query resources or operation records before deciding on the next step.

The error form between interfaces is not completely uniform: the error body may use a universal package, or it may only be detail, a field error object, or text. The client should first retain the HTTP status and Content-Type, and then parse according to the current interface.

Business code Quick Check​

Most business interfaces use message, code, data packages:

codeMeaningNext Steps
0This interface reports business successContinue to verify the type and scene fields of data; for example, model verification still depends on valid
1This interface reports service failureRead the HTTP status and message, process it according to the endpoint agreement, and do not regard HTTP 200 as success.

Not all interfaces return the service code. The token interface, raw JSON, file responses, real-time messages, and errors generated directly by the framework each have their own structures; the absence of code does not equal failure, and 0 cannot be supplied by default.

Model Verification Level​

issues[].severityWhether to Block valid: trueNext Steps
errorYes; as long as there is an error, valid is falseRe-verify after correction and do not create a formal job
warningNoPresent and assess business risk to users; don’t discard silently
infoNoReserved as positioning or optimization tips, can be folded and displayed as needed on the page

When the unified verification interface is completed normally, even valid: false usually returns HTTP 200 and business code: 0. The reliable judgment sequence is: HTTP request is successful, business code is successful, data structure is valid, and finally whether the model is passed is determined based on data.valid and issues.

counts.error, counts.warning and counts.info should be consistent with the number of corresponding levels in issues. The targeting fields may be empty; clients should save severity , code , message , scope , and path , and tolerate future additions of fields.

SDK Exception Mapping​

FaultCorresponds to HTTP or ScenariosJudgment and Next Step
NexusFlowErrorSDK exception common base classIt is only suitable as a last resort; you cannot decide to retry based on the base class alone.
AuthErrorMissing credentials, login failure, refresh failure, or token response missing access tokenSDK does not retain stable HTTP status fields; retrieval of valid credentials avoids logging passwords and tokens
ValidationErrorThe local modeling operation is illegal, or the unified verification returns valid: false and is thrown by the save/run method.Fix model; explicitly call model validation when full list of issues is required instead of just saving exception text
APIErrorHTTP 4xx/5xx not specifically mappedRead status_code and desensitized payload; decide whether to retry based on the idempotence of the operation
NotFoundErrorSDK actually received HTTP 404Check resource type, ID, environment and permissions; do not assume other "not found" scenarios to be an exception as well
ResultExpiredErrorHTTP 410 and the response root object or data contains result_status: expired; the job object can also throw it before the request when the known result of the job object is expired.Stop result reading and reconnection; job records can still be retained and recalculated if necessary
requests.exceptions.TimeoutHTTP connection or read exceeds client timeoutIt cannot be inferred that the write operation has not taken effect; query the resource status first, and then consider bounded retry for the read operation.
requests.exceptions.ConnectionError / SSLErrorDNS, connection refused, dropped connection, or certificate and hostname issuesFor connection errors, retry according to the total budget; for certificate errors, fix the configuration first, do not downgrade and turn off verification.
WebSocketBadStatusExceptionReal-time handshake is rejected by HTTP status, common in 401, 403The SDK will try to refresh 401 / 403 at most once for refreshable certifications; check the permissions and result status if it continues to fail.
WebSocketTimeoutExceptionSingle real-time receive timeoutThe result stream will refresh the job status; continue to wait if it has not been read yet. It is not the total deadline of the entire consumption process. The caller still needs to set the outer time budget.
WebSocketConnectionClosedExceptionLive connection is closed or interruptedThe result stream will be reconnected according to the offset within the configured number of times; after exceeding the upper limit, it is decided by the caller. Do not blindly replay append-based business operations.
TimeoutErrorjob.wait() or waiting to run a snapshot exceeds the total time limit set by the callerQuery the final job or snapshot status; timeout is not the final status of the platform
RuntimeErrorfailed or expired is observed while the current SDK is waiting to run a snapshotRead snapshot error_message, do not automatically upgrade it to job fault
ValueError / TypeError / KeyErrorThe public method parameter is invalid, or the platform response cannot be parsed according to the expected structureCorrect the calling parameters; if the response structure is abnormal, retain the desensitized response and check the compatibility of the SDK and platform version

The HTTP client of the SDK only maps HTTP 404 to NotFoundError; only the expired result 410 with a clear result_status: expired is mapped to ResultExpiredError. Other 410 are still ordinary APIError. For example, if the job freeze snapshot is cleared, it does not mean that the job result flow expires.

Unify the Order of Judgment​

When processing a request or job, judge in the following order to avoid cross-layer false positives:

  1. Request Layer: Whether a response was received, the HTTP status and what Content-Type is.
  2. Business Layer: Whether the interface uses universal packaging; if so, whether code is 0.
  3. Object Layer: What is currently being read is a job, result stream, running snapshot, operation and maintenance operation or deployment record.
  4. State Layer: Whether the state is the final state of the object; what is the allowed next operation.
  5. Data Layer: After the job ends, check whether the results, logs, job freeze snapshots and running snapshots are still available.
  6. Diagnostic Layer: Record resource UUID, occurrence time, current status and first valid error; token, password, request header, complete model and snapshot content must be desensitized.

No automation should ever use just a single string as a global success condition. The most typical complete judgment is: job success only indicates that the calculation ends normally; whether the result can be read depends on result_status, and whether a recoverable state is generated depends on status of the running snapshot itself.