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


##########
superset/commands/report/exceptions.py:
##########
@@ -225,6 +225,13 @@ class 
ReportScheduleExecuteUnexpectedError(CommandException):
     message = _("Report Schedule execution got an unexpected error.")
 
 
+class ReportScheduleTargetChartDeletedError(CommandException):

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Missing HTTP status code for not-found error</b></div>
   <div id="fix">
   
   The new exception inherits `status = 500` from `SupersetException` (line 
30), but the error describes a client-side "not found" condition (target chart 
was deleted), not a server misconfiguration. Add `status = 404` to match the 
pattern of `ReportScheduleNotFoundError` (line 176) which uses the same status 
for similar "target entity not found" scenarios. Without this, HTTP responses 
will incorrectly return 500 instead of 404.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #c2c31c</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



##########
superset/translations/fr/LC_MESSAGES/messages.po:
##########
@@ -3117,6 +3117,9 @@ msgstr "Changements de graphique"
 msgid "Chart could not be created."
 msgstr "Le graphique n'a pas pu être créé."
 
+msgid "Chart could not be restored."
+msgstr ""

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Missing French translation</b></div>
   <div id="fix">
   
   Empty French translation will display English text to French-speaking users 
when chart restore fails. Add proper translation following established pattern.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #c2c31c</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



##########
superset/translations/pt_BR/LC_MESSAGES/messages.po:
##########
@@ -3194,6 +3194,9 @@ msgstr "Alterações no gráfico"
 msgid "Chart could not be created."
 msgstr "Não foi possível criar o gráfico."
 
+msgid "Chart could not be restored."
+msgstr ""

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Missing pt_BR translation</b></div>
   <div id="fix">
   
   The new entry for 'Chart could not be restored.' has an empty `msgstr` 
field. Brazilian Portuguese users will see the untranslated English error 
message. Apply translation following the established pattern: "Não foi possível 
restaurar o gráfico."
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #c2c31c</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]

Reply via email to