codeant-ai-for-open-source[bot] commented on code in PR #43389:
URL: https://github.com/apache/superset/pull/43389#discussion_r3831842981
##########
superset/semantic_layers/api.py:
##########
@@ -672,6 +675,11 @@ def runtime_schema(self, uuid: str) -> FlaskResponse:
if not layer:
return self.response_404()
+ try:
+ layer.raise_for_access()
+ except SupersetSecurityException as ex:
+ return self.response(403, message=ex.message)
Review Comment:
**Suggestion:** The endpoint now returns HTTP 403 for callers without
access, but its OpenAPI documentation declares only 401 and 404 responses. Add
a 403 response reference so generated API clients and the published contract
accurately represent the new authorization failure. [api mismatch]
<details>
<summary><b>Severity Level:</b> Minor ๐งน</summary>
```mdx
- โ ๏ธ Generated clients may omit semantic-layer 403 handling.
```
</details>
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
<details>
<summary><b>Prompt for AI Agent ๐ค </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset/semantic_layers/api.py
**Line:** 681:681
**Comment:**
*Api Mismatch: The endpoint now returns HTTP 403 for callers without
access, but its OpenAPI documentation declares only 401 and 404 responses. Add
a 403 response reference so generated API clients and the published contract
accurately represent the new authorization failure.
Validate the correctness of the flagged issue. If correct, How can I resolve
this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask
user if the user wants to fix the rest of the comments as well. if said yes,
then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43389&comment_hash=fb791ee9c2264f6baaa67eaaa2b9e7cfd91f0f2bc2e0ea83935e96236cb6a1ff&reaction=like'>๐</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43389&comment_hash=fb791ee9c2264f6baaa67eaaa2b9e7cfd91f0f2bc2e0ea83935e96236cb6a1ff&reaction=dislike'>๐</a>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]