---
title: prefactor_core.exceptions module
editUrl: true
head: []
template: doc
sidebar:
  hidden: false
  attrs: {}
pagefind: true
draft: false
---

# prefactor_core.exceptions module

Custom exceptions for prefactor-core.

### *exception* prefactor_core.exceptions.ClientAlreadyInitializedError

Bases: [`PrefactorCoreError`](#prefactor_core.exceptions.PrefactorCoreError)

Raised when attempting to initialize a client that’s already initialized.

### *exception* prefactor_core.exceptions.ClientNotInitializedError

Bases: [`PrefactorCoreError`](#prefactor_core.exceptions.PrefactorCoreError)

Raised when attempting to use a client that hasn’t been initialized.

### *exception* prefactor_core.exceptions.InstanceNotFoundError

Bases: [`PrefactorCoreError`](#prefactor_core.exceptions.PrefactorCoreError)

Raised when an agent instance is not found.

### *exception* prefactor_core.exceptions.OperationError(message: str, operation_type: str | None = None)

Bases: [`PrefactorCoreError`](#prefactor_core.exceptions.PrefactorCoreError)

Raised when an operation fails to process.

### *exception* prefactor_core.exceptions.PrefactorCoreError

Bases: `Exception`

Base exception for all prefactor-core errors.

### *exception* prefactor_core.exceptions.PrefactorTelemetryFailureError(message: str, , cause: Exception, operation_type: str | None = None, dropped_operations: int = 0)

Bases: [`PrefactorCoreError`](#prefactor_core.exceptions.PrefactorCoreError)

Raised when telemetry enters a permanent failure state.

### *exception* prefactor_core.exceptions.SpanNotFoundError

Bases: [`PrefactorCoreError`](#prefactor_core.exceptions.PrefactorCoreError)

Raised when a span is not found.