Saltar para o conteúdo principal
Versão: Próximo

ProcessErrorCode

A singleton exposing the stable, machine-readable error codes carried by ProcessError .code, plus a meta() lookup mapping each code to its default severity and retryable flag. Compare against these constants instead of parsing message strings.

Access the shared instance via .me:

var $codes:=cs.EmbeddingStudio.ProcessErrorCode.me
If ($error.code=$codes.SAVE_FAILED)
// …
End if

Codes​

ConstantValueDefault severityRetryableRaised when…
NULL_INPUT100errorNoA required entity, selection, or definition was Null.
INVALID_DEFINITION101errorNoA value is not a usable Definition instance.
VALIDATION_FAILED102errorNoDefinition.validate() reported a problem.
MODEL_UNAVAILABLE200fatalYesA critical API error made the model unusable for the rest of the run.
MODEL_SKIPPED201errorYesA definition was skipped because its model already failed critically.
EMBED_FAILED202errorYesA non-critical embedding call failed (single entity or chunk).
VECTOR_COUNT_MISMATCH300errorNoThe provider returned a different vector count than requested.
SAVE_FAILED400errorYesentity.save() failed (validation, lock, …).

Codes are grouped by hundreds: 1xx input/configuration, 2xx model/API, 3xx data integrity, 4xx persistence. Unknown codes resolve to {severity: "error"; retryable: False; label: "UNKNOWN"}.

Functions​

meta()​

meta( $code : Integer ) : Object

Returns the severity and retryable flag associated with a code — the same values carried by a ProcessError with that code.

ArgumentTypeDescription
$codeIntegerOne of the code constants above.
Function resultObject{severity : Text; retryable : Boolean; label : Text}.
var $m:=cs.EmbeddingStudio.ProcessErrorCode.me.meta(cs.EmbeddingStudio.ProcessErrorCode.me.MODEL_UNAVAILABLE)
// $m = {severity: "fatal"; retryable: True; label: "MODEL_UNAVAILABLE"}

See also​