iachat/app/javascript/dashboard
Sivin Varghese 30d4f6c2f5
fix: TypeError cannot read properties of undefined (reading 'status') (#9774)
# Pull Request Template

## Description

**Issue**
The error `Cannot read properties of undefined (reading 'status')`
occurs because the `error.response.status` is accessed without checking
if `error.response` is present.

I can't able to reproduce this issue.

**Solution**
To resolve this issue, I added a check to ensure that this
`error.response` is defined before accessing the `error.response.status`

Fixes
https://linear.app/chatwoot/issue/CW-3322/typeerror-cannot-read-properties-of-undefined-reading-status

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)

## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [ ] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules
2024-07-16 07:02:02 +05:30
..
api feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722) 2024-07-10 08:32:16 -07:00
assets chore: Remove word spacing from p (#9353) 2024-05-06 18:27:56 -07:00
components fix: TypeError cannot read properties of null (reading 'file_type') (#9778) 2024-07-16 07:01:48 +05:30
composables feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722) 2024-07-10 08:32:16 -07:00
constants feat: Better SLA missed events popover (#9215) 2024-04-10 12:49:38 +05:30
helper fix: TypeError cannot read properties of undefined (reading '$store') (#9777) 2024-07-15 18:50:43 +05:30
i18n feat: Enable gmail channel (#9622) 2024-06-13 13:01:05 +05:30
mixins feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722) 2024-07-10 08:32:16 -07:00
modules chore: Move frontend authorization to permission based system (#9709) 2024-07-03 15:13:16 -07:00
routes fix: TypeError cannot read properties of undefined (reading 'status') (#9774) 2024-07-16 07:02:02 +05:30
store feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722) 2024-07-10 08:32:16 -07:00
App.vue feat: Reconnect logic (#9453) 2024-06-03 15:54:19 +05:30
featureFlags.js feat: Linear front end (#9491) 2024-05-23 11:58:24 +05:30