From d018bc678ed2c7eb7150f017be725811b8fccc02 Mon Sep 17 00:00:00 2001
From: Matthias Mair <code@mjmair.com>
Date: Sat, 24 May 2025 15:16:19 +0200
Subject: [PATCH] fix: make error code target more stable using sref (#9689)

---
 docs/mkdocs.yml                     | 1 +
 src/frontend/src/defaults/links.tsx | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml
index b3abf806cd..08e9b73e1e 100644
--- a/docs/mkdocs.yml
+++ b/docs/mkdocs.yml
@@ -277,6 +277,7 @@ plugins:
         'sref/ci-pre.md': 'https://github.com/inventree/InvenTree/blob/master/.pre-commit-config.yaml' # https://github.com/inventree/InvenTree/blob/master/.pre-commit-config.yaml
         'sref/test-sample.md': 'https://github.com/inventree/InvenTree/blob/master/src/backend/InvenTree/InvenTree/tests.py' # https://github.com/inventree/InvenTree/blob/master/src/backend/InvenTree/InvenTree/tests.py
         'sref/coverage.md': 'https://coveralls.io/github/inventree/InvenTree' # https://coveralls.io/github/inventree/InvenTree
+        'sref/error-codes.md': 'settings/error_codes.md'
 
 # Extensions
 markdown_extensions:
diff --git a/src/frontend/src/defaults/links.tsx b/src/frontend/src/defaults/links.tsx
index fe3e90573d..350bcd7d1e 100644
--- a/src/frontend/src/defaults/links.tsx
+++ b/src/frontend/src/defaults/links.tsx
@@ -76,7 +76,7 @@ export const docLinks = {
   developer: 'https://docs.inventree.org/en/latest/develop/contributing/',
   faq: 'https://docs.inventree.org/en/latest/faq/',
   github: 'https://github.com/inventree/inventree',
-  errorcodes: 'https://docs.inventree.org/en/latest/settings/error_codes/'
+  errorcodes: 'https://docs.inventree.org/en/latest/sref/error-codes/'
 };
 
 export function DocumentationLinks(): MenuLinkItem[] {