bartonhammond / bartonhammond/snowflake-hapi-openshift
TypeError: Cannot read property 'password' of null
- Dominant language
- JavaScript
- Stars
- 132
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
I was getting the following error when both the username and password are wrong:
```
Debug: internal, implementation, error
web_1 | TypeError: Cannot read property 'password' of null
web_1 | at Query. (/usr/src/app/src/routes/account/handlers.js:176
```
At closer inspection it seems that loginUser handler is missing `return` keywords when `reply(Boom.unauthorized('Authentication failed'));` is called.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in src/routes/account/handlers.js around line 176 and inspect the loginUser handler's behavior when both username and password are wrong. Reproduce the failed login, then verify it returns the unauthorized response without attempting to read password from null and that the TypeError no longer occurs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, mongodb, node.js
- Domain
- authentication, backend, database
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100