メインコンテンツまでスキップ
バージョン: 次へ

ProcessError

A ProcessError is one structured, typed entry in the errors collection of a ProcessResult. Its typed fields let callers react to a specific failure mode programmatically — retry transient failures, abort on a fatal model outage, count save failures — without parsing message strings.

You read these instances from ProcessResult.errors, directly or through its query helpers (errorsByCode, errorsByScope, retryableErrors).

プロパティ​

プロパティ名型説明
スコープTextWhere the error originated: "pipeline", "definition", "chunk", or "entity".
severityText"warning", "error", or "fatal". Determined by code (see ProcessErrorCode).
codeIntegerMachine-readable error code — compare against the constants on ProcessErrorCode.
refVariantScope-dependent reference: "Dataclass.vector", an entity primary key, a model alias, or Null.
messageTextHuman-readable, localized message.
retryableBooleanTrue when re-running the operation could plausibly succeed. Determined by code.

scope values​

スコープ意味
"pipeline"Top-level failure affecting the whole run (null selection, a model became unavailable).
"definition"A Definition failed validation or was skipped.
"chunk"A whole batch (chunk) of entities failed in a single API call.
"entity"A single entity failed to embed or save.

severity values​

Severity意味
"警告"Non-blocking — does not make ProcessResult.success false.
"error"A recoverable failure scoped to one entity, chunk, or definition. Makes success false.
"fatal"Blocks the rest of the run (e.g. the model is unavailable). Also surfaces via hasFatal.

計算プロパティ​

プロパティ型説明
isFatalBooleanTrue when severity = "fatal".

関数​

toObject()​

toObject() : Object

Returns a plain object ({scope, severity, code, ref, message, retryable}) suitable for logging or JSON serialization.

引数型説明
戻り値ObjectA JSON-friendly snapshot of the error.

例題​

React to failures by type rather than by message text:

var $r:=$p.process()

If (Not($r.success))

If ($r.hasFatal)
ALERT("A model became unavailable — aborting until it recovers.")
End if

var $codes:=cs.EmbeddingStudio.ProcessErrorCode.me
var $saveFailures:=$r.errorsByCode($codes.SAVE_FAILED)
If ($saveFailures.length>0)
ALERT(String($saveFailures.length)+" entities failed to save.")
End if

// Collect entity keys worth retrying later
var $retry:=$r.retryableErrors().query("scope = :1"; "entity").extract("ref")

End if

参照​

  • ProcessErrorCode — the catalogue of code values and their severity/retryability.
  • ProcessResult — owns the errors collection and the query helpers (errorsByCode, errorsByScope, retryableErrors).
  • Process — produces these errors.