-
Notifications
You must be signed in to change notification settings - Fork 513
[Docs] fix broken requests on API playground #1125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+89
−46
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
6d4b514
fix broken requests on API playground
madster456 90c43b4
Merge remote-tracking branch 'origin/dev' into docs/fix_api_playground
madster456 f7fbe9c
Merge branch 'dev' into docs/fix_api_playground
madster456 3b59039
Update for empty body in POST requests
madster456 291538f
Merge branch 'dev' into docs/fix_api_playground
madster456 a41a6e6
Merge branch 'dev' into docs/fix_api_playground
madster456 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
errorDetailstype defines aurlfield (line 31), and the PR description states that error responses include "URL, HTTP method, and error type classification," but the implementation never populates the URL field.View Details
📝 Patch Details
Analysis
Missing URL field in error details metadata for API playground
What fails: EnhancedAPIPage in
docs/src/components/api/enhanced-api-page.tsxdefines anerrorDetailstype with an optionalurlfield (line 30), but the catch block handler (lines 330-333) only populatesmethodandtypefields, leavingurlundefined despite it being available in scope.How to reproduce:
errorDetails.urlproperty will be undefinederrorDetails.urlshould contain the constructed request URL with all path parameters and query parameters resolvedCurrent behavior: errorDetails object contains only
methodandtype:Expected behavior: errorDetails object should include the URL:
Root cause: The
urlvariable is constructed and available in theexecuteRequestfunction (defined at line 236 in the try block), with path parameters and query parameters resolved before the fetch call. However, when error handling occurs in the catch block, the URL field was not included in the errorDetails metadata object despite being defined in the type schema, suggesting incomplete implementation of the feature for capturing comprehensive error context.Impact: While the URL field is not currently rendered in the UI, including it in the error metadata would enable future debugging capabilities and align with the complete error context design indicated by the type definition.