You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Where in the logs we end up throwing an exception "Cannot read property 'company_established_source' of undefined" - it might be undefined because a DB error lead to no data being returned or might be undefined because there's a logic error in the code. In this particular instance there's also no check for whether the array has any objects before accessing item 0...
I would suggest searching for all occurrences of the term "function (err" in the controllers and checking them for error detection.
The text was updated successfully, but these errors were encountered:
If a DB error results from a query, we should return an error in the request or cause an exception, e.g.
if (err) callback (err)
Instead of just carrying on regardless. Here's one suspicious occurrence:
https://github.com/NRGI/ResourceProjects.org/blob/master/server/controllers/source_tables.js#L83
Where in the logs we end up throwing an exception "Cannot read property 'company_established_source' of undefined" - it might be undefined because a DB error lead to no data being returned or might be undefined because there's a logic error in the code. In this particular instance there's also no check for whether the array has any objects before accessing item 0...
I would suggest searching for all occurrences of the term "function (err" in the controllers and checking them for error detection.
The text was updated successfully, but these errors were encountered: