bito-code-review[bot] commented on code in PR #44271:
URL: https://github.com/apache/superset/pull/44271#discussion_r4044612362
##########
superset-frontend/packages/superset-ui-core/src/query/getClientErrorObject.ts:
##########
@@ -297,12 +303,31 @@ export async function getErrorText(
error,
);
}
- if (typeof message === 'string' && message === 'Forbidden') {
+ if (status === 403) {
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>403 masks specific error</b></div>
<div id="fix">
`status === 403` now overrides the specific `error` text computed just
above, so every backend 403 (e.g. `core.py` 'You don't have the rights to
create a chart' / 'alter this chart') is masked by the generic 'You do not have
permission to edit this %s'. Previously only an exact `message === 'Forbidden'`
triggered it. Consider `status === 403 && !error` to keep the proxy/WAF fix
without losing specific messages.
</div>
</div>
<small><i>Code Review Run #787415</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
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]