docs: add extension error guidance page and fix ref_url links - #13937
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Walkthrough
ChangesCore ref_url behavior change
Estimated code review effort: 2 (Simple) | ~10 minutes Extension error and validation documentation
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 9✅ Passed checks (9 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
✅ Test Coverage AdvisorNo source changes detected without accompanying tests. Thanks for keeping coverage up! 🎉
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
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 winList the full error payload here.
ExtensionError.to_dict()also includescontent, so this description understates whatlfx extension validatereturns.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 valueStale test name.
test_ref_url_default_anchors_to_codenow 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 valueUnnecessary f-string.
DOCS_BASEhas no interpolation now that the per-code anchor was removed;f"{DOCS_BASE}"can just beDOCS_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
📒 Files selected for processing (10)
BUNDLE_API.mddocs/docs/Develop/extensions-errors.mdxdocs/docs/Develop/extensions-manifest.mdxdocs/docs/Develop/extensions-overview.mdxdocs/docs/Develop/extensions-quickstart.mdxdocs/sidebars.jssrc/backend/tests/unit/api/v1/test_extension_events_endpoint.pysrc/backend/tests/unit/api/v1/test_extensions_route_guard.pysrc/lfx/src/lfx/extension/errors.pysrc/lfx/tests/unit/extension/test_errors.py
| ```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 | ||
| ``` |
There was a problem hiding this comment.
🎯 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.
| ```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: |
There was a problem hiding this comment.
🎯 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.
| - [Manifest reference](./extensions-manifest) | ||
| - [Extension error codes](./extensions/errors) No newline at end of file |
There was a problem hiding this comment.
🎯 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.
| - [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.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Build successful! ✅ |
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_APIchangelog is added.Summary by CodeRabbit
New Features
Bug Fixes