Skip to content

Commit a687ab4

Browse files
committed
improve bulk action service
1 parent 13071a4 commit a687ab4

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

apps/webapp/app/v3/services/bulk/BulkActionV2.server.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -482,15 +482,15 @@ export class BulkActionService extends BaseService {
482482
});
483483

484484
if (!group) {
485-
throw new ServiceValidationError("Bulk action not found", 404);
485+
throw new ServiceValidationError(`Bulk action not found: ${friendlyId}`, 404);
486486
}
487487

488488
if (group.status === BulkActionStatus.COMPLETED) {
489-
throw new ServiceValidationError("Bulk action is already completed", 409);
489+
throw new ServiceValidationError(`Bulk action group already completed: ${friendlyId}`, 409);
490490
}
491491

492492
if (group.status === BulkActionStatus.ABORTED) {
493-
throw new ServiceValidationError("Bulk action is already aborted", 409);
493+
throw new ServiceValidationError(`Bulk action group already aborted: ${friendlyId}`, 409);
494494
}
495495

496496
//ack the job (this doesn't guarantee it won't run again)
@@ -508,9 +508,10 @@ export class BulkActionService extends BaseService {
508508
}
509509

510510
export function freezeRunListFilters(filters: RunListInputFilters): RunListInputFilters {
511-
const frozenFilters: RunListInputFilters = { ...filters };
512-
delete (frozenFilters as any).cursor;
513-
delete (frozenFilters as any).direction;
511+
const { cursor: _cursor, direction: _direction, ...frozenFilters } = filters as RunListInputFilters & {
512+
cursor?: string;
513+
direction?: "forward" | "backward";
514+
};
514515

515516
// Explicit run-id selections target specific, already-existing runs, so we
516517
// don't apply a time bound (which could otherwise exclude a selected run).

0 commit comments

Comments
 (0)