Skip to main content

Shifts · Junior developer

The fix

AssistantSuggested fix

src/delivery/date.ts

  export function parseDeliveryDate(input: string): Date {
-   return parseIso(input);
+   try {
+     return parseIso(input);
+   } catch {
+     return new Date(); // fall back to today
+   }
  }

10:00 amDecision 1

Platform team · You, two months into the job

Checkout fails for some customers in New Zealand. The error log names parseDeliveryDate. You paste the stack trace into the assistant and it hands back a fix.

Press 1, 2 or 3 to choose.