department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
282 stars 203 forks source link

Bug: PATCH cancellations sent to VPG have no request body #82750

Closed bcrosbyva closed 5 months ago

bcrosbyva commented 5 months ago

Summary

While attempting to cancel an OH appointment an error was received back from VPG. Describe what went wrong

Specs

Steps to Reproduce

Enable the

  1. In Flipper, enable the va_online_scheduling_use_vpg and va_online_scheduling_enable_OH_cancellations feature flags for Judy Morrison
  2. Go to VAOS, open an upcoming OH appointment
  3. Click the cancellation button

Actual Result

VETSAPI sends a PATCH cancellation request to VPG with no request body, resulting in an error:

{
  "errors": [
    {
      "title": "Bad Request",
      "detail": "Required request body is missing: public org.springframework.http.ResponseEntity<?> gov.va.mobile.vpg.v1.resource.AppointmentResource.patchAppointment(org.springframework.cloud.gateway.mvc.ProxyExchange<byte[]>,java.lang.String,java.lang.String,java.lang.String,java.lang.String)",
      "code": "VAOS_400",
      "source": {
        "vamfUrl": "https://internal-dsva-vagov-staging-fwdproxy-1821450725.us-gov-west-1.elb.amazonaws.com:4463/vpg/v1/patients/434fce82be04d498f7e7e54f30c0d4c35f61bc4e53610137bcb446723597732a/appointments/38eb82d7451c9036df43fa75318a5453d1a66e3055ce09ebcec16821949e44cf",
        "vamfBody": "{\"code\":400,\"status\":400,\"message\":\"Required request body is missing: public org.springframework.http.ResponseEntity<?> gov.va.mobile.vpg.v1.resource.AppointmentResource.patchAppointment(org.springframework.cloud.gateway.mvc.ProxyExchange<byte[]>,java.lang.String,java.lang.String,java.lang.String,java.lang.String)\",\"id\":\"e16a2ff4-197c-4895-908f-96d1fcf13f3e\",\"traceId\":\"55fa6be23b2197b9f9c4d1a7975d21a6\"}",
        "vamfStatus": 400
      },
      "status": "400"
    }
  ]
}
vaos-vpg-cancellation-error.png

Desired Result

VETSAPI sends the PATCH request to VPG with the patch operations in the request body.

Definition of Done

BrittanySFowler commented 5 months ago

This was a bug found and pulled into sprint 10