@@ -404,9 +404,9 @@ async def approve_campaign_action(request: Request, packet_id: str, idx: int) ->
404404 output_dir = _output_dir (request )
405405 try :
406406 _approve_action (packet_id , idx , output_dir )
407- except (ValueError , IndexError ) as exc :
407+ except (ValueError , IndexError ):
408408 return HTMLResponse (
409- f '<tr><td colspan="6" class="error">Not found: { _escape ( exc ) } </td></tr>' ,
409+ '<tr><td colspan="6" class="error">Not found. </td></tr>' ,
410410 status_code = 404 ,
411411 )
412412
@@ -441,9 +441,9 @@ async def reject_campaign_action(
441441 output_dir = _output_dir (request )
442442 try :
443443 _reject_action (packet_id , idx , output_dir , reason = reason )
444- except (ValueError , IndexError ) as exc :
444+ except (ValueError , IndexError ):
445445 return HTMLResponse (
446- f '<tr><td colspan="6" class="error">Not found: { _escape ( exc ) } </td></tr>' ,
446+ '<tr><td colspan="6" class="error">Not found. </td></tr>' ,
447447 status_code = 404 ,
448448 )
449449
@@ -573,9 +573,9 @@ async def approve_section_route(request: Request, record_id: str) -> HTMLRespons
573573 output_dir = _output_dir (request )
574574 try :
575575 _approve_section (record_id , output_dir )
576- except ValueError as exc :
576+ except ValueError :
577577 return HTMLResponse (
578- f '<div class="section-card section-card--error">Not found: { _escape ( exc ) } </div>' ,
578+ '<div class="section-card section-card--error">Not found. </div>' ,
579579 status_code = 404 ,
580580 )
581581
@@ -605,9 +605,9 @@ async def reject_section_route(
605605 output_dir = _output_dir (request )
606606 try :
607607 _reject_section (record_id , output_dir , reason = reason )
608- except ValueError as exc :
608+ except ValueError :
609609 return HTMLResponse (
610- f '<div class="section-card section-card--error">Not found: { _escape ( exc ) } </div>' ,
610+ '<div class="section-card section-card--error">Not found. </div>' ,
611611 status_code = 404 ,
612612 )
613613
@@ -781,9 +781,9 @@ async def accept_initiative_route(
781781
782782 try :
783783 truth = json .loads (truth_path .read_text ())
784- except (OSError , json .JSONDecodeError ) as exc :
784+ except (OSError , json .JSONDecodeError ):
785785 return HTMLResponse (
786- f '<div class="suggestion-card accept-error">Error: failed to read portfolio-truth: { _escape ( exc ) } </div>' ,
786+ '<div class="suggestion-card accept-error">Error: failed to read portfolio truth. </div>' ,
787787 status_code = 400 ,
788788 )
789789
@@ -797,9 +797,9 @@ async def accept_initiative_route(
797797 deadline = deadline ,
798798 target_tier = target_tier ,
799799 )
800- except ValueError as exc :
800+ except ValueError :
801801 return HTMLResponse (
802- f '<div class="suggestion-card accept-error">Error: { _escape ( exc ) } </div>' ,
802+ '<div class="suggestion-card accept-error">Error: unable to accept initiative. </div>' ,
803803 status_code = 400 ,
804804 )
805805
@@ -826,9 +826,9 @@ async def dismiss_suggestion_route(
826826 entry = dismiss_suggestion_record (
827827 dismissed_path (output_dir ), repo_name = repo_name , reason = reason
828828 )
829- except ValueError as exc :
829+ except ValueError :
830830 return HTMLResponse (
831- f '<div class="suggestion-card accept-error">Error: { _escape ( exc ) } </div>' ,
831+ '<div class="suggestion-card accept-error">Error: unable to dismiss suggestion. </div>' ,
832832 status_code = 400 ,
833833 )
834834
0 commit comments