priorityLab.lastError reports a failure—behavior should be understandable or self-healing where product agrees.CreateUpdateAppointment (json: true). Attik treats a top-level or nested response.confirmation string as the property id returned by the vendor.errors payload to throw on, but confirmation is missing or not a string, the client raises PriorityLabError: message Missing confirmation in PriorityLab response, code missing_confirmation, retryable.syncPriorityLabAppointment only persists _priorityLabPropertyId after createOrUpdateAppointment returns a property id; on failure it records priorityLab.lastError and does not clear an existing stored id—so the Integrations tab can still show a property id from a prior successful run while the latest attempt failed.confirmation, return a different shape, or use a non-string value; Decision needed whether to widen parsing, treat no-op updates differently, or escalate to PriorityLab with captured payloads.attik-backend/src/util/functions/priorityLab/priorityLabApi.ts — parseVendorResponse, createOrUpdateAppointment, and PriorityLabError construction; today confirmation must be a string or the error fires.attik-backend/src/util/functions/priorityLab/syncPriorityLabAppointment.ts — upsert path calls createOrUpdateAppointment via tryUpsert; success clears lastError and writes _priorityLabPropertyId; failure records lastError only.attik-backend/src/util/functions/priorityLab/buildPriorityLabPayload.ts — payload sent on create vs update (existing propertyId passed through when present); relevant if product wants idempotent behavior when response omits confirmation.attik-backend/src/routes/inspection.ts — enqueues queuePriorityLabJob after qualifying inspection saves (see import from ../events/bullmq/priorityLabQueues.js).attik-backend/src/events/bullmq/priorityLabQueues.ts — priorityLabAppointment BullMQ queue/worker wiring, retry/backoff defaults, and invocation of syncPriorityLabAppointment; relevant if logging or failure classification should change at the job boundary.missing_confirmation for support; Decision needed whether retry should differ from other PriorityLabError codes.confirmation is always returned on success for create and update paths, and whether alternate keys exist in production.attik-backend/src/util/functions/priorityLab/priorityLabApi.tsattik-backend/src/util/functions/priorityLab/syncPriorityLabAppointment.tsattik-backend/src/util/functions/priorityLab/buildPriorityLabPayload.tsattik-backend/src/routes/inspection.tsattik-backend/src/events/bullmq/priorityLabQueues.tsPlease authenticate to join the conversation.
Completed
Main App
2 months ago
Linear
Get notified by email when there are changes.
Completed
Main App
2 months ago
Linear
Get notified by email when there are changes.