# Class PersistenceProviderQueryExceptionExtensions OptimaJet.Workflow.Core.Fault.PersistenceProviderQueryExceptionExtensions Provides helper extension methods for [PersistenceProviderQueryException](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Fault/PersistenceProviderQueryException/) instances. Namespace: [OptimaJet.Workflow.Core.Fault](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Fault/) ```csharp public static class PersistenceProviderQueryExceptionExtensions ``` ## Methods `public static Exception RethrowAllowedIfRetrievable(this Exception exception)` Returns either the original exception or a rewritten [PersistenceProviderQueryException](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Fault/PersistenceProviderQueryException/) based on the first nested [PersistenceProviderQueryException](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Fault/PersistenceProviderQueryException/) found in the inner exception chain. ### Parameters | Name | Type | Description | | --- | --- | --- | | `exception` | `Exception` | The exception to inspect and potentially transform. | ### Returns | Type | Description | | --- | --- | | `Exception` | The original `exception` if it does not contain a nested [PersistenceProviderQueryException](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Fault/PersistenceProviderQueryException/); otherwise a new [PersistenceProviderQueryException](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Fault/PersistenceProviderQueryException/) created from the found exception's inner exception. | [Previous PersistenceProviderQueryException](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Fault/PersistenceProviderQueryException/) [Next ProcessAlreadyExistsException](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Fault/ProcessAlreadyExistsException/)