---
url: "https://vueda.dev/v3/reference/api/js/utils/errors/members/AuthScopeInvalidatedError.md"
title: "AuthScopeInvalidatedError"
---

# AuthScopeInvalidatedError

## Overview

Error used to abandon an in-flight authorization-dependent request whose response arrived after
the authenticated user changed. The response was fetched under a different principal, so it is
discarded instead of being cached, and the awaiting caller is rejected rather than handed
`undefined`.

This error means "the request was abandoned, retry if you still need the data". It is not a
transport or permission failure, so consumers should neither surface it to the user nor cache it.

## Properties

### cause {#cause}

Type: `unknown`

Source: `node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.es2022.error.d.ts:24`

### key {#key}

The cache key the abandoned response would have been written to.

Type: `string`

Source: `client/lib/utils/errors.js:371`

### message {#message}

Type: `string`

Source: `node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.es5.d.ts:1077`

### name {#name}

Type: `string`

Source: `client/lib/utils/errors.js:365`

### stack {#stack}

Type: `string`

Source: `node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.es5.d.ts:1078`

### stackTraceLimit {#stackTraceLimit}

The `Error.stackTraceLimit` property specifies the number of stack frames
collected by a stack trace (whether generated by `new Error().stack` or
`Error.captureStackTrace(obj)`).

The default value is `10` but may be set to any valid JavaScript number. Changes
will affect any stack trace captured _after_ the value has been changed.

If set to a non-number value, or set to a negative number, stack traces will
not capture any frames.

Type: `number`

Source: `node_modules/.pnpm/@types+node@22.19.11/node_modules/@types/node/globals.d.ts:68`

## Methods

- [constructor](/v3/reference/api/js/utils/errors/AuthScopeInvalidatedError/methods/constructor.md) - Creates an instance of AuthScopeInvalidatedError.
- [captureStackTrace](/v3/reference/api/js/utils/errors/AuthScopeInvalidatedError/methods/captureStackTrace.md) - Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called.
- [prepareStackTrace](/v3/reference/api/js/utils/errors/AuthScopeInvalidatedError/methods/prepareStackTrace.md)

## Source

`client/lib/utils/errors.js:356`
