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

Improve export server data validation / sync with client side data model #743

Open
ZhangYiJiang opened this issue Jan 16, 2018 · 1 comment

Comments

@ZhangYiJiang
Copy link
Member

Report: https://sentry.io/nusmods/export/issues/434914645/

Error: Evaluation failed: TypeError: Cannot use 'in' operator to search for 'CFG1010' in undefined
    at <anonymous>:1:47499
    at Array.forEach (<anonymous>)
    at m (<anonymous>:1:47477)
    at t.value (<anonymous>:1:177575)
    at l (<anonymous>:1:217005)
    at beginWork (<anonymous>:1:221406)
    at o (<anonymous>:1:209902)
    at a (<anonymous>:1:210223)
    at u (<anonymous>:1:210461)
    at _ (<anonymous>:1:213995)
  File "<anonymous>", line 1, in null.<anonymous>
  ?, in Array.forEach
  File "<anonymous>", line 1, in m
  File "<anonymous>", line 1, in t.value
  File "<anonymous>", line 1, in l
...
(8 additional frame(s) were not displayed)

Error: Evaluation failed: TypeError: Cannot use 'in' operator to search for 'CFG1010' in undefined
    at <anonymous>:1:47499
    at Array.forEach (<anonymous>)
    at m (<anonymous>:1:47477)
    at t.value (<anonymous>:1:177575)
    at l (<anonymous>:1:217005)
    at beginWork (<anonymous>:1:221406)
    at o (<anonymous>:1:209902)
    at a (<anonymous>:1:210223)
    at u (<anonymous>:1:210461)
    at _ (<anonymous>:1:213995)

There's something in here that's causing the export server to crash. I can reproduce reliably in production, but not locally, which is really annoying

@ZhangYiJiang
Copy link
Member Author

ZhangYiJiang commented Jan 16, 2018

Ah, I know what's wrong. The data is missing the colors key - this export URL was created by an old version of the client. The validator should probably be updated so that this gets flagged up as a validation error instead of crashing the server, but it's not critical.

@ZhangYiJiang ZhangYiJiang changed the title Export crashing with this specific timetable / input Improve export server data validation / sync with client side data modal Jan 16, 2018
@ZhangYiJiang ZhangYiJiang changed the title Improve export server data validation / sync with client side data modal Improve export server data validation / sync with client side data model Jan 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant