File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -588,10 +588,10 @@ func Delete(ctx *context_module.Context) {
588588 run , err := actions_model .GetRunByIndex (ctx , repoID , runIndex )
589589 if err != nil {
590590 if errors .Is (err , util .ErrNotExist ) {
591- ctx .HTTPError ( http . StatusNotFound , err . Error () )
591+ ctx .NotFound ( nil )
592592 return
593593 }
594- ctx .HTTPError ( http . StatusInternalServerError , err . Error () )
594+ ctx .ServerError ( "GetRunByIndex" , err )
595595 return
596596 }
597597
@@ -601,11 +601,11 @@ func Delete(ctx *context_module.Context) {
601601 }
602602
603603 if err := actions_service .DeleteRun (ctx , run ); err != nil {
604- ctx .HTTPError ( http . StatusInternalServerError , err . Error () )
604+ ctx .ServerError ( "DeleteRun" , err )
605605 return
606606 }
607607
608- ctx .JSON ( http . StatusOK , struct {}{} )
608+ ctx .JSONOK ( )
609609}
610610
611611// getRunJobs gets the jobs of runIndex, and returns jobs[jobIndex], jobs.
You can’t perform that action at this time.
0 commit comments