feat(hk): connect delivery failures to precise diagnostic records
This commit is contained in:
1 parent
275a574203
commit
60e49c1ec9
17 files changed
+253
-20
No files matched your search
@@ -1,8 +1,14 @@
|
||||
import { isDeliveryReference } from "@/features/operations/delivery-diagnostics";
|
||||
import type { CmsErrorRecord } from "./error-monitor";
|
||||
|
||||
export function errorOperationLink(record: CmsErrorRecord): string | null {
|
||||
const context = record.context;
|
||||
if (record.source === "server") {
|
||||
if (
|
||||
context.module === "operations" &&
|
||||
isDeliveryReference(context.deliveryId)
|
||||
)
|
||||
return `/admin/devops/deliveries?id=${context.deliveryId}`;
|
||||
if (context.module === "news") {
|
||||
const id = String(context.articleId ?? "");
|
||||
return /^[1-9]\d{0,18}$/.test(id)
|
||||
|
||||
Reference in new issue
Block a user