[NPMCLI-239] ERR! Cannot read property 'status' of undefined Created: 11/May/20 Updated: 06/Apr/21 Resolved: 16/May/20 |
|
| Status: | Closed |
| Project: | Magnolia CLI |
| Component/s: | None |
| Affects Version/s: | 3.1.0 |
| Fix Version/s: | 4.0.0 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Maxime Michel | Assignee: | Federico Grilli |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | maintenance | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Template: |
|
||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||
| Task DoD: |
[X]*
Doc/release notes changes? Comment present?
[X]*
Downstream builds green?
[X]*
Solution information and context easily available?
[X]*
Tests
[X]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||
| Bug DoR: |
[X]*
Steps to reproduce, expected, and actual results filled
[X]*
Affected version filled
|
||||||||||||
| Release notes required: |
Yes
|
||||||||||||
| Date of First Response: | |||||||||||||
| Sprint: | Maintenance 7 | ||||||||||||
| Story Points: | 1 | ||||||||||||
| Description |
|
A bug reported by multiple users in the comments of It looks like there is some sort of HTTP error to begin with, but that the snippet handling errors fails early due to an undefined object, and we therefore do not know what actually happened. I would suggest making the following block safer with checks on err, err.response and err.response.status: https://git.magnolia-cms.com/projects/BUILD/repos/npm-cli/browse/lib/download.js#29-35 |
| Comments |
| Comment by Bryan Lewis [ 12/May/20 ] |
|
Thanks for helping out with this issue! |