Show / Hide Table of Contents

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.

Inheritance
object
Exception
ActionError
Implements
ISerializable
Inherited Members
Exception.GetBaseException()
Exception.GetObjectData(SerializationInfo, StreamingContext)
Exception.GetType()
Exception.ToString()
Exception.Data
Exception.HelpLink
Exception.HResult
Exception.InnerException
Exception.Message
Exception.Source
Exception.StackTrace
Exception.TargetSite
Exception.SerializeObjectState
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: Cognite.Extractor.Utils.Unstable.Tasks
Assembly: ExtractorUtils.dll
Syntax
public class ActionError : Exception, ISerializable

Constructors

| Edit this page View Source

ActionError(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 Source

Details

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
| Edit this page View Source

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
| Edit this page View Source

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>

Implements

ISerializable

Extension Methods

DataModelUtils.GetOrCreateResourcesAsync<T, T2>(T2, IEnumerable<InstanceIdentifier>, Func<IEnumerable<InstanceIdentifier>, IEnumerable<SourcedNodeWrite<T>>>, Func<IEnumerable<SourcedNodeWrite<T>>, SanitationMode, (IEnumerable<SourcedNodeWrite<T>>, IEnumerable<CogniteError<SourcedNodeWrite<T>>>)>, int, int, RetryMode, SanitationMode, CancellationToken)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX