Class ActionError
Exception type for expected, structured failures raised from within a custom action's target callback.
Unlike an arbitrary exception, an ActionError carries a caller-chosen
ErrorType and optional Details, which the dispatcher surfaces
as structured resultMetadata on the action's terminal failed update, in
addition to using Message as the result message.
Implements
Inherited Members
Namespace: Cognite.Extractor.Utils.Unstable.Tasks
Assembly: ExtractorUtils.dll
Syntax
public class ActionError : Exception, ISerializable
Constructors
| Edit this page View SourceActionError(string, string, string?)
Constructor.
Declaration
public ActionError(string errorType, string message, string? details = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | errorType | Short, caller-defined category for this failure. |
| string | message | Human-readable message, used as the action's result message. |
| string | details | Optional longer-form detail about the failure. |
Properties
| Edit this page View SourceDetails
Optional longer-form detail about the failure, distinct from the short human-readable Message. Surfaced in the terminal action update's result metadata under the key "errorDetail", if set.
Declaration
public string? Details { get; }
Property Value
| Type | Description |
|---|---|
| string |
ErrorType
Short, caller-defined category for this failure (e.g. "invalid_parameter", "missing_parameter"). Surfaced in the terminal action update's result metadata under the key "errorType".
Declaration
public string ErrorType { get; }
Property Value
| Type | Description |
|---|---|
| string |
ResultMetadata
Structured metadata for this error, suitable for use as an CogniteSdk.Alpha.ActionUpdate.ResultMetadata.
Declaration
public IReadOnlyDictionary<string, string> ResultMetadata { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyDictionary<string, string> |