# useAuthError | @account-kit/react

> Overview of the useAuthError hook from @account-kit/react

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

{/* This file is auto-generated by TypeDoc. Do not edit manually. */}

```ts
function useAuthError(): UseAuthErrorResult;
```

Defined in: [account-kit/react/src/hooks/useAuthError.ts:21](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAuthError.ts#L21)

Returns the error returned from the current auth step, if it exists

## Example

```ts twoslash
import { useAuthError } from "@account-kit/react";

const error = useAuthError();

if (error) {
  console.error("Error occurred during auth step", error);
}
```

## Returns

[`UseAuthErrorResult`](../type-aliases/UseAuthErrorResult)

the current Error object