Show / Hide Table of Contents

Class ExtractorError

Utility type for reporting errors to integrations.

After creation you should immediately either Dispose, call Finish, or call Instant.

Typically created through utility methods on IErrorReporter

Inheritance
object
ExtractorError
Implements
IDisposable
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Cognite.Extractor.Utils.Unstable.Tasks
Assembly: ExtractorUtils.dll
Syntax
public class ExtractorError : IDisposable

Constructors

| Edit this page View Source

ExtractorError(ErrorLevel, string, IIntegrationSink, string?, string?, DateTime?)

Create a new extractor error.

Declaration
public ExtractorError(ErrorLevel level, string description, IIntegrationSink sink, string? details = null, string? taskName = null, DateTime? now = null)
Parameters
Type Name Description
ErrorLevel level

Error level.

string description

Short error description.

IIntegrationSink sink

Error sink this is written to.

string details

Long error details.

string taskName

Task that generated this error. If left out, the error is assigned to the extractor itself.

DateTime? now

Current time, for synchronization. Defaults to DateTime.UtcNow

Properties

| Edit this page View Source

Description

Short error description.

Declaration
public string Description { get; }
Property Value
Type Description
string
| Edit this page View Source

Details

Long error details.

Declaration
public string? Details { get; set; }
Property Value
Type Description
string
| Edit this page View Source

EndTime

Time the error ended, if it has ended yet.

Declaration
public DateTime? EndTime { get; }
Property Value
Type Description
DateTime?
| Edit this page View Source

ExternalId

Generated error external ID.

Declaration
public string ExternalId { get; }
Property Value
Type Description
string
| Edit this page View Source

Level

Error level.

Declaration
public ErrorLevel Level { get; }
Property Value
Type Description
ErrorLevel
| Edit this page View Source

StartTime

Time the error started.

Declaration
public DateTime StartTime { get; }
Property Value
Type Description
DateTime
| Edit this page View Source

TaskName

Task that generated this error.

If left out, the error is assigned to the extractor itself.

Declaration
public string? TaskName { get; }
Property Value
Type Description
string

Methods

| Edit this page View Source

Dispose()

Dispose the error, just calls Finish.

Declaration
public void Dispose()
| Edit this page View Source

Dispose(bool)

Dispose the error, just calls Finish.

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
bool disposing
| Edit this page View Source

Finish(DateTime?)

Mark this error as completed and report it.

Declaration
public void Finish(DateTime? now = null)
Parameters
Type Name Description
DateTime? now

Current time, for synchronization. Defaults to DateTime.UtcNow

| Edit this page View Source

Instant()

Immediately mark this error as completed.

Declaration
public void Instant()
| Edit this page View Source

ToSdk()

Return an ErrorWithTask for writing to the integrations API.

Declaration
public ErrorWithTask ToSdk()
Returns
Type Description
ErrorWithTask

ErrorWithTask object

Implements

IDisposable

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