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
| Object | Field or Source | State Collection | Answered Questions |
|---|---|---|---|
| simulation job | job.status | pending、running、pausing、paused、stopping、stopped、success、fault | Which stage the calculation has reached and whether it has ended |
| Job result flow | job.result_status | available、unavailable、expired | Whether the server result stream can currently be read |
| Run snapshot | runtime_snapshot.status | saving、available、failed、expired | Whether a copy of running status data has been saved and can be used for recovery startup |
| Operation and maintenance records | operation.status | pending、running、success、failed | Whether a service action, verification or environment change is completed |
| Deployment record | status / last_deployment_status in deployment response, version list, or installation log | pending、running、success、failed、rolled_back | Which stage of a package installation or deployment is recorded? |
| HTTP request | HTTP status code | 2xx、4xx、5xx | Whether this request was successful at the protocol and interface processing layer |
| Generic business response | Response body code | 0、1 | Whether the interface using general encapsulation reports business success |
| Model verification issues | issues[].severity | error、warning、info | Will a validation issue prevent the model from passing unified validation? |
Statuses with the same name cannot be mixed. For example:
- The
successof the job means that the calculation ends normally, but does not mean that the result is stillavailable; - The
availableof the result stream indicates that you can currently try to read, and theavailableof the running snapshot indicates that the snapshot data has been saved; - Use
faultfor job exceptions, usefailedfor running snapshots, operation and maintenance operations, and deployment failures; stoppedof the job indicates that the calculation has stopped, not "Stopped" of the service instance;- HTTP
200, businesscode: 0and model verificationvalid: trueare 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.status | Chinese Meaning | Final State | Things to Do Now | Next Steps |
|---|---|---|---|---|
pending | Pending | No | Can request a stop; not yet suitable for pausing, issuing component instructions, or saving running snapshots | Wait briefly and refresh; check startup logs and computing resources if it obviously exceeds the usual time for similar jobs. |
running | Running | No | Can pause, stop, and issue instructions supported by the kernel; can request to save running snapshots | Continue to consume status and results; do not judge whether it is finished based on the progress value only |
pausing | Pausing | No | It 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 |
paused | Paused | No | Can resume, stop, issue instructions supported by the kernel or save running snapshots | Choose to resume or stop; it is a steady state, not a fault |
stopping | Stopping | No | No more pauses, resumes, repeated stops, business instructions, or running snapshot requests are initiated | Wait for stopped or fault; if convergence does not occur for a long time, check the log and have the administrator check the running instance |
stopped | Stopped | Yes | The same job cannot be resumed; remaining logs and results can be read | Check result_status separately; create a new job if you need to continue |
success | Completed | Yes | Can no longer control the job; still retained logs and results can be read | Check the logs, business results and result_status. Do not equate success with the results being still available or the business conclusions being correct. |
fault | Fault | Yes | The same job cannot be restored; pre-failure logs and partial results may still be readable | Find 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_status | Current Meaning | Judge | Next Steps |
|---|---|---|---|
available | Activity result metadata exists, you can try to connect or read by offset | There 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 |
unavailable | The 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. |
expired | The server result stream for the ended job exceeds the current environment's retention window and the active result metadata no longer exists | Job records and job status can continue to exist; old results will not be restored due to reconnection | Stop reconnecting and check the saved data on the browser or business side; recalculate if necessary results are missing. |
Common but easily misjudged combinations include:
| Combination | Correct Explanation |
|---|---|
running + available | The job is running and the result channel is already readable; ordinary results may not have been generated yet |
fault + available | The job failed, but the pre-failure log or some results can still be read |
stopped + available | Job Stopped , the results before stopping are still within the server retention range |
success + expired | The calculation completed normally, but the server result has expired |
Any job status + unavailable | The 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.status | Current Meaning | Judge | Next Steps |
|---|---|---|---|
saving | The 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 |
available | Snapshot data saved | Before use, you still need to check whether the interface allows access and the returned expires_at | It can be used to resume and start new jobs within the validity period; it needs to be regenerated after exceeding the platform retention range. |
failed | The 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 failed | Read error_message; after confirming that the source job still supports saving, decide whether to create a new snapshot request |
expired | The snapshot validity period has expired and the data is no longer available for recovery. | Original binary content cannot be restored by refreshing or retrying | Select 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.status | Meaning | Next Steps |
|---|---|---|
pending | The 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 |
running | Service action, verification or configuration application is executing | Check the operation details and target service status; if the request times out, check the record before deciding whether to retry. |
success | The operation process report was successful this time | Then check whether the target service, configuration or version meets expectations; recording success does not replace running state verification. |
failed | Operation process report failed | Check 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 Status | Meaning | Next Steps |
|---|---|---|
pending | Deployment record waiting for execution | Check scheduling and dependencies, and do not create the same deployment repeatedly |
running | Installation and subsequent verification have not yet been completed | Continue to read the installation log and check the execution process; do not directly judge a long waiting time as a failure |
success | The current installation process is completed and verification is completed according to this process. | Continue to check actual versions, service health, and critical access paths |
failed | Installation, dependency check, or post-deployment verification failed | First 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_back | The record clearly indicates that this deployment has been rolled back | Check 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 Status | Common Current Meanings | Next Steps |
|---|---|---|
200 OK | Read, update or business operation is completed; it may also just verify normal execution | Continue to check the general package code, and model verification also checks data.valid |
201 Created | Partial creation interface creates resources | Save the returned resource ID; do not assume that all created interfaces return 201 |
204 No Content | The operation was successful and there was no response body | Do not call JSON parsing; update local state according to interface contract |
400 Bad Request | Invalid JSON, field, parameter, state precondition, or validation request | Fix request; don't retry infinitely as is |
401 Unauthorized | No valid authentication was provided, or the access token is invalid | Refresh or re-authenticate once; stop after failure, do not log in repeatedly |
403 Forbidden | The identity is valid, but there is no target resource or operation permission | Check the account, organizational role and resource ownership; logging in again will not increase the permissions |
404 Not Found | The 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 Conflict | The request conflicts with the current resource, association, or identity state | Re-read the current status and merge or replace the identifiers according to the interface requirements before proceeding. |
410 Gone | The associated data has been cleaned or expired | View the response body to distinguish scenarios such as result expiration and job snapshot cleanup; usually recovery cannot be achieved by retrying |
500 Internal Server Error | An unexpected exception occurred in the service | Record the request association ID, time and desensitization error text; first check whether the write operation has taken effect |
503 Service Unavailable | The service or dependency is temporarily unavailable | Read operations can be backed off within the total budget; write operations confirm the final status before deciding whether to retry. |
504 Gateway Timeout | Gateway or dependency processing timeout | It 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:
code | Meaning | Next Steps |
|---|---|---|
0 | This interface reports business success | Continue to verify the type and scene fields of data; for example, model verification still depends on valid |
1 | This interface reports service failure | Read 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[].severity | Whether to Block valid: true | Next Steps |
|---|---|---|
error | Yes; as long as there is an error, valid is false | Re-verify after correction and do not create a formal job |
warning | No | Present and assess business risk to users; don’t discard silently |
info | No | Reserved 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
| Fault | Corresponds to HTTP or Scenarios | Judgment and Next Step |
|---|---|---|
NexusFlowError | SDK exception common base class | It is only suitable as a last resort; you cannot decide to retry based on the base class alone. |
AuthError | Missing credentials, login failure, refresh failure, or token response missing access token | SDK does not retain stable HTTP status fields; retrieval of valid credentials avoids logging passwords and tokens |
ValidationError | The 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 |
APIError | HTTP 4xx/5xx not specifically mapped | Read status_code and desensitized payload; decide whether to retry based on the idempotence of the operation |
NotFoundError | SDK actually received HTTP 404 | Check resource type, ID, environment and permissions; do not assume other "not found" scenarios to be an exception as well |
ResultExpiredError | HTTP 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.Timeout | HTTP connection or read exceeds client timeout | It 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 / SSLError | DNS, connection refused, dropped connection, or certificate and hostname issues | For connection errors, retry according to the total budget; for certificate errors, fix the configuration first, do not downgrade and turn off verification. |
WebSocketBadStatusException | Real-time handshake is rejected by HTTP status, common in 401, 403 | The SDK will try to refresh 401 / 403 at most once for refreshable certifications; check the permissions and result status if it continues to fail. |
WebSocketTimeoutException | Single real-time receive timeout | The 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. |
WebSocketConnectionClosedException | Live connection is closed or interrupted | The 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. |
TimeoutError | job.wait() or waiting to run a snapshot exceeds the total time limit set by the caller | Query the final job or snapshot status; timeout is not the final status of the platform |
RuntimeError | failed or expired is observed while the current SDK is waiting to run a snapshot | Read snapshot error_message, do not automatically upgrade it to job fault |
ValueError / TypeError / KeyError | The public method parameter is invalid, or the platform response cannot be parsed according to the expected structure | Correct 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:
- Request Layer: Whether a response was received, the HTTP status and what
Content-Typeis. - Business Layer: Whether the interface uses universal packaging; if so, whether
codeis0. - Object Layer: What is currently being read is a job, result stream, running snapshot, operation and maintenance operation or deployment record.
- State Layer: Whether the state is the final state of the object; what is the allowed next operation.
- Data Layer: After the job ends, check whether the results, logs, job freeze snapshots and running snapshots are still available.
- 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.