Skip to content

docs: add extension error guidance page and fix ref_url links - #13937

Merged
mendonk merged 6 commits into
release-1.11.0from
docs-links-from-error-messasges
Jul 8, 2026
Merged

docs: add extension error guidance page and fix ref_url links#13937
mendonk merged 6 commits into
release-1.11.0from
docs-links-from-error-messasges

Conversation

@mendonk

@mendonk mendonk commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Extension errors now point to a single guidance page instead of per-code broken anchor links. Documentation is updated and tests are adjusted to match the new behavior. An entry to the BUNDLE_API changelog is added.

Summary by CodeRabbit

  • New Features

    • Added a dedicated documentation page for extension error codes, including guidance on validating extensions and reading error hints.
    • Improved extension docs navigation with new links to the error codes reference.
  • Bug Fixes

    • Error guidance links now point to a single documentation page instead of code-specific anchors.
    • CLI and API error output now use the updated documentation link format.

@mendonk
mendonk requested a review from erichare July 1, 2026 20:02
@mendonk mendonk self-assigned this Jul 1, 2026
@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d546f2cf-ccc1-44d6-9073-cad3c645a023

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

ExtensionError.ref_url and CLI see: output now always point to a single errors documentation page (https://docs.langflow.org/extensions/errors) instead of per-code anchored URLs. Related tests and changelog were updated. Documentation was restructured with a new extension error codes page, cross-links, sidebar entry, and a revised quickstart validation section.

Changes

Core ref_url behavior change

Layer / File(s) Summary
ExtensionError ref_url defaulting logic
src/lfx/src/lfx/extension/errors.py
DOCS_BASE docs, ERROR_CODES registry comment, and ExtensionError.__post_init__ updated so ref_url defaults to DOCS_BASE alone, without a #<code> anchor.
Unit tests for updated ref_url
src/lfx/tests/unit/extension/test_errors.py, src/backend/tests/unit/api/v1/test_extension_events_endpoint.py, src/backend/tests/unit/api/v1/test_extensions_route_guard.py
Tests updated to assert ref_url/see: equal the exact single-page URL instead of an endswith/anchor check.
Changelog documentation
BUNDLE_API.md
New changelog entry documenting the ref_url/see: behavior change.

Estimated code review effort: 2 (Simple) | ~10 minutes

Extension error and validation documentation

Layer / File(s) Summary
New extension error codes page
docs/docs/Develop/extensions-errors.mdx, docs/sidebars.js
Adds a new page explaining how to resolve errors via hint, an example error, a validation tip, a See also list, and registers the page in the sidebar.
Cross-reference updates in existing docs
docs/docs/Develop/extensions-manifest.mdx, docs/docs/Develop/extensions-overview.mdx
Updates links to point to the new error codes page instead of the source ERROR_CODES constant, adding See also entries.
Quickstart validation section restructuring
docs/docs/Develop/extensions-quickstart.mdx
Replaces inline validation steps with a cross-reference and adds a new anchored "Validate an extension" section detailing lfx extension validate . behavior.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

  • langflow-ai/langflow#13374: Introduces the extension-events-keyspace-forbidden typed 422 error that depends on the same ref_url/see: formatting changed here.
  • langflow-ai/langflow#13563: Also modifies src/lfx/src/lfx/extension/errors.py, adding a new error code alongside the ref_url formatting change.

Suggested labels: documentation, bug

Suggested reviewers: dkaushik94, erichare

🚥 Pre-merge checks | ✅ 9
✅ Passed checks (9 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: a new extension error guidance page and updated ref_url links.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Test Coverage For New Implementations ✅ Passed PR includes updated unit tests for the new error URL behavior and route/keyspace regressions, and they follow the repo’s test naming conventions.
Test Quality And Coverage ✅ Passed The PR adds real coverage for all error-code branches plus async endpoint success/error cases, and the backend pytest config uses asyncio_mode=auto.
Test File Naming And Structure ✅ Passed PASS: Changed test files are correctly named test_*.py in unit test dirs, use pytest-style functions, and cover both positive and negative paths.
Excessive Mock Usage Warning ✅ Passed PASS: The changed tests use a few MagicMocks only to stub external services/settings; core behavior is exercised directly, and snapshot tests use no mocks.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs-links-from-error-messasges

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added documentation Improvements or additions to documentation and removed documentation Improvements or additions to documentation labels Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

✅ Test Coverage Advisor

No source changes detected without accompanying tests. Thanks for keeping coverage up! 🎉

Advisory check only — never blocks merge.

@github-actions github-actions Bot added documentation Improvements or additions to documentation and removed documentation Improvements or additions to documentation labels Jul 1, 2026
@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.84%. Comparing base (55debb8) to head (83bdfc4).
⚠️ Report is 2 commits behind head on release-1.11.0.

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                 @@
##           release-1.11.0   #13937      +/-   ##
==================================================
+ Coverage           59.72%   59.84%   +0.12%     
==================================================
  Files                2367     2313      -54     
  Lines              226686   225731     -955     
  Branches            34003    32786    -1217     
==================================================
- Hits               135377   135084     -293     
+ Misses              89715    89053     -662     
  Partials             1594     1594              
Flag Coverage Δ
backend 66.17% <ø> (+0.05%) ⬆️
frontend 58.83% <ø> (+0.16%) ⬆️
lfx 57.32% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/lfx/src/lfx/extension/errors.py 88.00% <100.00%> (ø)

... and 361 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

This comment has been minimized.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/docs/Develop/extensions-manifest.mdx (1)

129-129: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

List the full error payload here.

ExtensionError.to_dict() also includes content, so this description understates what lfx extension validate returns.

Suggested fix
-Run `lfx extension validate <path>` to see every error as a structured object with `code`, `message`, `location`, `hint`, and `ref_url`.
+Run `lfx extension validate <path>` to see every error as a structured object with `code`, `message`, `location`, `content`, `hint`, and `ref_url`.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/docs/Develop/extensions-manifest.mdx` at line 129, The validation output
description is incomplete in the extensions manifest docs. Update the text near
the `lfx extension validate <path>` mention to list the full error payload
returned by `ExtensionError.to_dict()`, including `content` in addition to
`code`, `message`, `location`, `hint`, and `ref_url`, so the docs match the
actual `lfx extension validate` output.
🧹 Nitpick comments (2)
src/lfx/tests/unit/extension/test_errors.py (1)

20-22: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Stale test name.

test_ref_url_default_anchors_to_code now asserts the opposite of what the name implies (no anchor is appended). Consider renaming, e.g. test_ref_url_defaults_to_docs_base.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/lfx/tests/unit/extension/test_errors.py` around lines 20 - 22, The test
name in test_ref_url_default_anchors_to_code no longer matches the behavior
being asserted, since ExtensionError.ref_url is expected to return the plain
DOCS_BASE without an anchor. Rename the test to something like
test_ref_url_defaults_to_docs_base so it accurately reflects the assertion and
keeps the intent clear.
src/lfx/src/lfx/extension/errors.py (1)

179-179: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Unnecessary f-string.

DOCS_BASE has no interpolation now that the per-code anchor was removed; f"{DOCS_BASE}" can just be DOCS_BASE.

♻️ Proposed fix
-            object.__setattr__(self, "ref_url", f"{DOCS_BASE}")
+            object.__setattr__(self, "ref_url", DOCS_BASE)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/lfx/src/lfx/extension/errors.py` at line 179, The ref_url assignment in
the extension errors initialization uses an unnecessary f-string now that the
anchor was removed. Update the assignment in the code path setting self.ref_url
to use DOCS_BASE directly instead of wrapping it in f"{...}", and keep the
change localized to the object.__setattr__ call in the errors class.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/docs/Develop/extensions-errors.mdx`:
- Around line 8-14: The example for inline-bundle-name-invalid should match the
validator’s actual hint text so docs and runtime output stay consistent. Update
the sample in extensions-errors.mdx to use the same wording emitted by the
validator for the Notion case, and keep the example aligned with the error shape
shown by inline bundle validation. Reference the inline-bundle-name-invalid
example block rather than changing the validator behavior.

In `@docs/docs/Develop/extensions-manifest.mdx`:
- Line 117: The manifest docs currently link to the old nested relative error
page path instead of the new error-docs slug. Update both references in the
manifest error sections so the link text and target used around the “Extension
error codes” mention point to the new route, using the same slug consistently
wherever the error docs are referenced in this page.

In `@docs/docs/Develop/extensions-overview.mdx`:
- Around line 116-117: The extension error codes link in the extensions overview
still points to the old relative path, so update the markdown link in the
extensions-overview content to use the new error-docs route instead. Fix the
reference near the Manifest reference entry by changing the Extension error
codes link target so it resolves to the new page from this document’s location.

---

Outside diff comments:
In `@docs/docs/Develop/extensions-manifest.mdx`:
- Line 129: The validation output description is incomplete in the extensions
manifest docs. Update the text near the `lfx extension validate <path>` mention
to list the full error payload returned by `ExtensionError.to_dict()`, including
`content` in addition to `code`, `message`, `location`, `hint`, and `ref_url`,
so the docs match the actual `lfx extension validate` output.

---

Nitpick comments:
In `@src/lfx/src/lfx/extension/errors.py`:
- Line 179: The ref_url assignment in the extension errors initialization uses
an unnecessary f-string now that the anchor was removed. Update the assignment
in the code path setting self.ref_url to use DOCS_BASE directly instead of
wrapping it in f"{...}", and keep the change localized to the object.__setattr__
call in the errors class.

In `@src/lfx/tests/unit/extension/test_errors.py`:
- Around line 20-22: The test name in test_ref_url_default_anchors_to_code no
longer matches the behavior being asserted, since ExtensionError.ref_url is
expected to return the plain DOCS_BASE without an anchor. Rename the test to
something like test_ref_url_defaults_to_docs_base so it accurately reflects the
assertion and keeps the intent clear.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f247dc21-6f6b-4570-919d-52823975af26

📥 Commits

Reviewing files that changed from the base of the PR and between 951ea94 and 3ef15b3.

📒 Files selected for processing (10)
  • BUNDLE_API.md
  • docs/docs/Develop/extensions-errors.mdx
  • docs/docs/Develop/extensions-manifest.mdx
  • docs/docs/Develop/extensions-overview.mdx
  • docs/docs/Develop/extensions-quickstart.mdx
  • docs/sidebars.js
  • src/backend/tests/unit/api/v1/test_extension_events_endpoint.py
  • src/backend/tests/unit/api/v1/test_extensions_route_guard.py
  • src/lfx/src/lfx/extension/errors.py
  • src/lfx/tests/unit/extension/test_errors.py

Comment on lines +8 to +14
```text
error[inline-bundle-name-invalid]: Inline bundle directory 'Notion' does not match ...
location: /path/to/components/Notion
content: Notion
hint: Rename the directory to lowercase snake_case starting with a letter, 2-64 characters.
see: https://docs.langflow.org/extensions/errors
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Make the example hint match the runtime text.

This example is more specific than the actual inline-bundle-name-invalid hint emitted by the validator, so readers will see different output at runtime.

Suggested fix
-  hint:     Rename the directory to lowercase snake_case starting with a letter, 2-64 characters.
+  hint:     Inline bundle directory 'Notion' does not match the bundle name pattern (lowercase snake_case).
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
```text
error[inline-bundle-name-invalid]: Inline bundle directory 'Notion' does not match ...
location: /path/to/components/Notion
content: Notion
hint: Rename the directory to lowercase snake_case starting with a letter, 2-64 characters.
see: https://docs.langflow.org/extensions/errors
```
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/docs/Develop/extensions-errors.mdx` around lines 8 - 14, The example for
inline-bundle-name-invalid should match the validator’s actual hint text so docs
and runtime output stay consistent. Update the sample in extensions-errors.mdx
to use the same wording emitted by the validator for the Notion case, and keep
the example aligned with the error shape shown by inline bundle validation.
Reference the inline-bundle-name-invalid example block rather than changing the
validator behavior.

## Error codes raised against this manifest

The loader and validator both emit typed errors keyed by the manifest field that triggered them. The full code list is at [`lfx.extension.errors.ERROR_CODES`](https://github.com/langflow-ai/langflow/blob/main/src/lfx/src/lfx/extension/errors.py); the codes most relevant when authoring a manifest are:
The loader and validator both emit typed errors keyed by the manifest field that triggered them. The full reference is on the [Extension error codes](./extensions/errors) page; the codes most relevant when authoring a manifest are:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use the actual route for the new error docs page.

./extensions/errors resolves as a nested relative path from this page, not the new error-docs page. Point both references at the new slug instead.

Suggested fix
- The full reference is on the [Extension error codes](./extensions/errors) page; the codes most relevant when authoring a manifest are:
+ The full reference is on the [Extension error codes](/extensions/errors) page; the codes most relevant when authoring a manifest are:
...
-- [Extension error codes](./extensions/errors)
+- [Extension error codes](/extensions/errors)

Also applies to: 135-135

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/docs/Develop/extensions-manifest.mdx` at line 117, The manifest docs
currently link to the old nested relative error page path instead of the new
error-docs slug. Update both references in the manifest error sections so the
link text and target used around the “Extension error codes” mention point to
the new route, using the same slug consistently wherever the error docs are
referenced in this page.

Comment on lines +116 to +117
- [Manifest reference](./extensions-manifest)
- [Extension error codes](./extensions/errors) No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use the new error-docs route here too.

./extensions/errors is a relative path under extensions-overview, so it won’t land on the new page.

Suggested fix
- [Extension error codes](./extensions/errors)
+ [Extension error codes](/extensions/errors)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- [Manifest reference](./extensions-manifest)
- [Extension error codes](./extensions/errors)
- [Manifest reference](./extensions-manifest)
- [Extension error codes](/extensions/errors)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/docs/Develop/extensions-overview.mdx` around lines 116 - 117, The
extension error codes link in the extensions overview still points to the old
relative path, so update the markdown link in the extensions-overview content to
use the new error-docs route instead. Fix the reference near the Manifest
reference entry by changing the Extension error codes link target so it resolves
to the new page from this document’s location.

@github-actions github-actions Bot added documentation Improvements or additions to documentation and removed documentation Improvements or additions to documentation labels Jul 1, 2026
@github-actions

This comment has been minimized.

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Frontend Unit Test Coverage Report

Coverage Summary

Lines Statements Branches Functions
Coverage: 44%
44.79% (60951/136059) 69.59% (8343/11988) 43.19% (1381/3197)

Unit Test Results

Tests Skipped Failures Errors Time
5153 0 💤 0 ❌ 0 🔥 23m 16s ⏱️

@erichare erichare left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM @mendonk just a conflict to resolve it looks like

@github-actions github-actions Bot added documentation Improvements or additions to documentation and removed documentation Improvements or additions to documentation labels Jul 6, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot added documentation Improvements or additions to documentation and removed documentation Improvements or additions to documentation labels Jul 6, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot added documentation Improvements or additions to documentation and removed documentation Improvements or additions to documentation labels Jul 8, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot added documentation Improvements or additions to documentation and removed documentation Improvements or additions to documentation labels Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Build successful! ✅
Deploying docs draft.
Deploy successful! View draft

@mendonk
mendonk added this pull request to the merge queue Jul 8, 2026
Merged via the queue into release-1.11.0 with commit 2b4b628 Jul 8, 2026
155 checks passed
@mendonk
mendonk deleted the docs-links-from-error-messasges branch July 8, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants