bito-code-review[bot] commented on code in PR #44271:
URL: https://github.com/apache/superset/pull/44271#discussion_r4051355871


##########
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:
   <!-- Bito Reply -->
   The suggestion provided by the reviewer is appropriate and improves the code 
by ensuring that specific backend error messages are not masked by the generic 
permission error. By checking `!error` alongside `status === 403`, the logic 
correctly preserves custom error messages while still applying the fallback for 
generic 403 responses.
   
   
**superset-frontend/packages/superset-ui-core/src/query/getClientErrorObject.ts**
   ```
   if (status === 403 && !error) {
   ```



-- 
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]

Reply via email to