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

ReportCard.js causes a crash if result object is undefined #10

Closed
abrahamq opened this issue Oct 18, 2016 · 6 comments
Closed

ReportCard.js causes a crash if result object is undefined #10

abrahamq opened this issue Oct 18, 2016 · 6 comments
Assignees

Comments

@abrahamq
Copy link
Member

Putting this here so I remember to fix it later.

I think we're not doing error checking correctly in ReportCard.js.

/Users/abrahamq/Documents/urop/cognicity-grasp/ReportCard.js:157
else if (result[0].received === false){
^

TypeError: Cannot read property 'received' of undefined
at /Users/abrahamq/Documents/urop/cognicity-grasp/ReportCard.js:157:29
at null. (/Users/abrahamq/Documents/urop/cognicity-grasp/ReportCard.js:85:6)
at Query.handleReadyForQuery (/Users/abrahamq/Documents/urop/cognicity-grasp/node_modules/pg/lib/query.js:114:10)
at null. (/Users/abrahamq/Documents/urop/cognicity-grasp/node_modules/pg/lib/client.js:172:19)
at emitOne (events.js:82:20)
at emit (events.js:169:7)
at Socket. (/Users/abrahamq/Documents/urop/cognicity-grasp/node_modules/pg/lib/connection.js:121:12)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:146:16)

@abrahamq abrahamq self-assigned this Oct 18, 2016
@MaanasaPriyaa
Copy link
Collaborator

There is an issue assigned to me that discusses about error handling. I guess this will come under that issue. Can you check? I'm planning to work on this today.

@tomasholderness
Copy link
Contributor

I refactored a lot of the ReportCard.js code yesterday to help make it more testable.

The above error should have been fixed in: 691a203

@abrahamq
Copy link
Member Author

Hey, sorry didn't see that, maybe we should merge master into mvp-cards?

On Oct 18, 2016 11:28 AM, "Tomas Holderness" notifications@github.com
wrote:

I refactored a lot of the ReportCard.js code yesterday to help make it
more testable.

The above error should have been fixed in: 691a203
691a203


You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
#10 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIT_WwiHA_zTAJQXtC0OoEK2MJCwyFQBks5q1OW7gaJpZM4KZnHB
.

@tomasholderness
Copy link
Contributor

Yes - probably good to do this incrementally. I've finished updating with the ReportCard.js logic for the time being, but now working on Bot.js.

@tomasholderness
Copy link
Contributor

Hi @abrahamq - now you've pulled latest master to MVP can we close this?

@abrahamq
Copy link
Member Author

I think so, let me make sure tonight and I'll close it.

On Oct 26, 2016 3:54 PM, "Tomas Holderness" notifications@github.com
wrote:

Hi @abrahamq https://github.com/abrahamq - now you've pulled latest
master to MVP can we close this?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#10 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIT_W24sxUuRFme2NMvj4zOBKUQGjuV8ks5q37APgaJpZM4KZnHB
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants