> ## Documentation Index
> Fetch the complete documentation index at: https://docs.heliosrender.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors

> Error handling utilities for Helios

## HeliosError

Custom error class for all Helios-specific errors.

```typescript theme={null}
export class HeliosError extends Error {
  public readonly code: HeliosErrorCode;
  public readonly suggestion?: string;

  constructor(code: HeliosErrorCode, message: string, suggestion?: string)
}
```

**code** `HeliosErrorCode` *required*

Error code identifying the specific error type

**message** `string` *required*

Human-readable error message

**suggestion** `string`

Optional suggestion for resolving the error

### Properties

**code** `HeliosErrorCode`

The error code identifying the specific error type

**suggestion** `string | undefined`

Optional suggestion for resolving the error

### Static methods

#### isHeliosError

Type guard to check if an unknown error is a HeliosError.

```typescript theme={null}
static isHeliosError(error: unknown): error is HeliosError
```

**error** `unknown` *required*

Error to check

**return** `boolean`

True if the error is a HeliosError instance

### Example

```typescript theme={null}
import { HeliosError, HeliosErrorCode } from '@helios-project/core';

try {
  // Some operation that might fail
  throw new HeliosError(
    HeliosErrorCode.INVALID_FPS,
    'FPS must be greater than 0',
    'Use a positive number for fps'
  );
} catch (error) {
  if (HeliosError.isHeliosError(error)) {
    console.error(`Error [${error.code}]: ${error.message}`);
    if (error.suggestion) {
      console.log(`Suggestion: ${error.suggestion}`);
    }
  }
}
```

## HeliosErrorCode

Enumeration of all possible error codes in Helios.

```typescript theme={null}
enum HeliosErrorCode {
  INVALID_DURATION = 'INVALID_DURATION',
  INVALID_FPS = 'INVALID_FPS',
  INVALID_PLAYBACK_RANGE = 'INVALID_PLAYBACK_RANGE',
  INVALID_INPUT_RANGE = 'INVALID_INPUT_RANGE',
  INVALID_OUTPUT_RANGE = 'INVALID_OUTPUT_RANGE',
  UNSORTED_INPUT_RANGE = 'UNSORTED_INPUT_RANGE',
  INVALID_SPRING_CONFIG = 'INVALID_SPRING_CONFIG',
  INVALID_SRT_FORMAT = 'INVALID_SRT_FORMAT',
  INVALID_WEBVTT_FORMAT = 'INVALID_WEBVTT_FORMAT',
  INVALID_INPUT_PROPS = 'INVALID_INPUT_PROPS',
  INVALID_RESOLUTION = 'INVALID_RESOLUTION',
  INVALID_COLOR_FORMAT = 'INVALID_COLOR_FORMAT',
  INVALID_TIMECODE_FORMAT = 'INVALID_TIMECODE_FORMAT',
  INVALID_MARKER = 'INVALID_MARKER',
  MARKER_NOT_FOUND = 'MARKER_NOT_FOUND',
  INVALID_SCHEMA = 'INVALID_SCHEMA'
}
```

### Error codes

**INVALID\_DURATION**

Duration value is invalid or out of acceptable range

**INVALID\_FPS**

Frames per second value is invalid (e.g., zero or negative)

**INVALID\_PLAYBACK\_RANGE**

Playback range is invalid or malformed

**INVALID\_INPUT\_RANGE**

Input range for interpolation is invalid

**INVALID\_OUTPUT\_RANGE**

Output range for interpolation is invalid

**UNSORTED\_INPUT\_RANGE**

Input range values are not in strictly ascending order

**INVALID\_SPRING\_CONFIG**

Spring animation configuration is invalid

**INVALID\_SRT\_FORMAT**

SRT subtitle format is malformed

**INVALID\_WEBVTT\_FORMAT**

WebVTT subtitle format is malformed

**INVALID\_INPUT\_PROPS**

Component input props failed validation

**INVALID\_RESOLUTION**

Resolution value is invalid

**INVALID\_COLOR\_FORMAT**

Color string format is not recognized

**INVALID\_TIMECODE\_FORMAT**

Timecode format does not match HH:MM:SS:FF

**INVALID\_MARKER**

Marker definition is invalid

**MARKER\_NOT\_FOUND**

Requested marker does not exist

**INVALID\_SCHEMA**

Schema definition is invalid or malformed


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.