---
title: RELKIT_CACHE_KEY_INVALID
description: "Cache key is not valid JSON."
pagination: false
search:
  keywords: [RELKIT_CACHE_KEY_INVALID]
sidebar:
  icon: triangle-alert
---

{/* Generated by apps/docs/scripts/generate.ts. Do not edit. */}

**Cache key is not valid JSON.**

## What happened

A cache key, cache ID or schema version cannot be turned into plain JSON. Keys must be JSON data such as strings, numbers, arrays and plain objects.

## What to do

Use a key built from JSON data, without `undefined`, functions, class instances or `NaN`, and give the cache a non-empty ID.

Reported by `relkit/diagnostics`, `relkit/providers-local`.

See [all error codes](/docs/errors).
