Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EstablishClaim returns a TypeError for null error object #13405

Closed
ajspotts opened this issue Feb 13, 2020 · 6 comments
Closed

EstablishClaim returns a TypeError for null error object #13405

ajspotts opened this issue Feb 13, 2020 · 6 comments
Assignees
Labels
Priority: Medium Blocking issue w/workaround, or "second in" priority for new work. Product: caseflow-dispatch Source: Sentry Alert created because of a Sentry alert Stakeholder: BVA Functionality associated with the Board of Veterans' Appeals workflows/feature requests Team: Echo 🐬 Type: Bug

Comments

@ajspotts
Copy link
Contributor

EstablishClaim returns TypeError Cannot read property 'error_code' of null when the error object is null.

https://sentry.ds.va.gov/department-of-veterans-affairs/caseflow/issues/7176
https://dsva.slack.com/archives/CHX8FMP28/p1581609716309200

@ajspotts ajspotts added Product: caseflow-dispatch Source: Sentry Alert created because of a Sentry alert Priority: Medium Blocking issue w/workaround, or "second in" priority for new work. labels Feb 13, 2020
@jjohni
Copy link

jjohni commented Feb 13, 2020

YourIT Ticket Number
INC9449308

Product
Dispatch

User Type
Intake VBA User

CSS ID
AMCLWOOD

Urgency
No Workaround - Medium Priority

What was the user trying to accomplish?
The user is trying to access dispatch. The product goes in and out for her and she will get an error message with a code.

Issue Description
I have attached a picture in the thread to display the error message she is receiving.

Caseflow URL(s) Associated
https://appeals.cf.ds.va.gov/dispatch/establish-claim

@jjohni
Copy link

jjohni commented Feb 13, 2020

Uploading INC9449308.png…

@jjohni jjohni closed this as completed Feb 13, 2020
@jjohni jjohni reopened this Feb 13, 2020
@jjohni
Copy link

jjohni commented Feb 13, 2020

I clicked "close and comment" in error

va-bot pushed a commit that referenced this issue Feb 13, 2020
Connects #13405 

### Description
The `handleDecisionPageSubmit` function was returning an error when the `error` object was null.  Utilized optional chaining operator to check for existence of the error object to solve.
@hschallhorn hschallhorn added Type: Bug Stakeholder: BVA Functionality associated with the Board of Veterans' Appeals workflows/feature requests labels Apr 2, 2020
@hschallhorn
Copy link
Contributor

what is this chart?

1 | 
2 | |||||
3 | |||||||
5 | 
8 | 

Why 2?

  • Could just be add-a-safe-operator &

Why 3?

  • Maybe this shouldn't be able to be null? In which case, the issue is deeper

@yoomlam
Copy link
Contributor

yoomlam commented Apr 2, 2020

/app/containers/EstablishClaimPage/EstablishClaim.jsx at line 222:67

        }
        this.props.performEstablishClaimSuccess();
      },
      (error) => {
        this.props.performEstablishClaimFailure();
        const errorMessage = CREATE_EP_ERRORS[error.response.body.error_code] || CREATE_EP_ERRORS.default;
        const nextModifier = this.validModifiers()[1];
        if (error.response.body.error_code === 'duplicate_ep' && nextModifier) {
          this.props.onDuplicateEP(nextModifier);

Navigation:

to /dispatch/establish-claim/178434#/form
from /dispatch/establish-claim/178434#/decision

@hschallhorn
Copy link
Contributor

Last seen 2 months ago, looks like the fix worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Medium Blocking issue w/workaround, or "second in" priority for new work. Product: caseflow-dispatch Source: Sentry Alert created because of a Sentry alert Stakeholder: BVA Functionality associated with the Board of Veterans' Appeals workflows/feature requests Team: Echo 🐬 Type: Bug
Projects
None yet
Development

No branches or pull requests

5 participants