Skip to content

Rx: Have specific error handling for 'optimistic lock' errors #5116

Open
@TKDickson

Description

@TKDickson

Description

As a veteran, I want to see my prescriptions and refill my meds, so that I can manage my health. However, we currently experience a fairly high error rate (5-7% were the latest numbers I saw) of "optimistic lock" errors that prevent veterans from using the Rx feature. Also, adding to the confusion, when when get these errors back we display a message of "you don't have any medications" which is incorrect.

image.png

As part of this story we want to:

  • Create specific error-handling UI & workflow for this most-common error, especially since refreshing the meds list should often realistically work to actually return the med list for the veteran

Therese's hot take: something along the lines of “your pharmacy record is locked/unavailable/in use, but refresh and try again” with a refresh button.

Acceptance Criteria

  • AC 1
  • AC 2
  • AC 3

Accessibility Requirements

  • AC 1
  • AC 2
  • AC 3

Notes & Open Questions

  • Dependencies/Roadblocks:

    • Any internal/external dependencies?
    • Test accounts needed?
  • Does this require QA?

  • Dev Notes:

An example of the charles proxy return for one of these errors, although there may be other codes they map to:

{
	"errors": [{
		"title": "Operation failed",
		"detail": "Something went wrong. Please try again later.",
		"code": "RX99",
		"source": "Error in fetching currentPrescriptions Object of class [gov.va.med.mhv.rxrefill.data.model.Request] with identifier [21904830]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [gov.va.med.mhv.rxrefill.data.model.Request#21904830]",
		"status": "502"
	}]
}

Ticket Checklist

  • Acceptance criteria defined
  • Labels added (front-end, back-end, feature)
  • Linked to an Epic

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    HealthTickets are tied to the Health Product Team Pmsfront-endTicket requires front-end workrx-refillux

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions