# useGetRecoveryRequest

## Description

This hook allows you to query a recovery request.

## Parameters

```typescript
type GetRecoveryRequestParams = {
    rpcUrl?: string;
};
```

## Example

```typescript
import { useGetRecoveryRequest } from "@/hooks/useGetRecoveryRequest";

export const RecoveryRequestStatus = () => {
  const { data, isLoading, isError, error } = useGetRecoveryRequest({
    rpcUrl: 'https://my-rpc-url.com',
  });

  if (isLoading) return <p>Loading recovery request status...</p>;
  if (isError) return <p>Error: {error?.message}</p>;

  return (
    <div>
      {data ? (
        <>
          <p>Recovery Request Active</p>
          <p>New Owner: {data.newOwner}</p>
          <p>Execution Time: {new Date(data.executionTime * 1000).toLocaleString()}</p>
        </>
      ) : (
        <p>No active recovery request</p>
      )}
    </div>
  );
};
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cometh.io/integrations/react-hooks/recovery/usegetrecoveryrequest.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
