311-data icon indicating copy to clipboard operation
311-data copied to clipboard

TyperError: Cannot read properties of undefined (reading 'status') in action GET_METADATA_FAILURE

Open edwinjue opened this issue 1 year ago • 1 comments

Describe the bug The error appears in the browser console: TyperError: Cannot read properties of undefined (reading 'status')

To Reproduce Steps to reproduce the behavior:

  1. Turn off your network connection (or place in airplane mode)
  2. Start the client locally (per instructions)
  3. Open the site in Google Chrome and open the inspect window (F12 or Right-click > Inspect)
  4. Go to the Console tab of the inspect window
  5. Notice the error message (image of console error)

Expected behavior No error message

Screenshots Selection_999(2400)

Desktop (please complete the following information):

  • OS: Linux
  • Browser Chrome
  • Version 105.0.5195.52 (Official Build) (64-bit)

Additional context

edwinjue avatar Sep 03 '22 19:09 edwinjue

after doing some research, this can be corrected with optional chaining of the status property like this response?.status

edwinjue avatar Oct 22 '22 04:10 edwinjue