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

Add logging for #6702, #6604 #6833

Merged
merged 4 commits into from
Jun 15, 2019
Merged

Add logging for #6702, #6604 #6833

merged 4 commits into from
Jun 15, 2019

Conversation

nithusha21
Copy link
Contributor

Explanation

Adds error logging for #6702 and #6604. Both of these errors seem to be occurring at a non-trivial input case which we want to log so that we can guard against such inputs.

Checklist

  • The PR title starts with "Fix #bugnum: ", followed by a short, clear summary of the changes. (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • The PR explanation includes the words "Fixes #bugnum: ..." (or "Fixes part of #bugnum" if the PR only partially fixes an issue).
  • The linter/Karma presubmit checks have passed.
    • These should run automatically, but if not, you can manually trigger them locally using python scripts/pre_commit_linter.py and bash scripts/run_frontend_tests.sh.
  • The PR is made from a branch that's not called "develop".
  • The PR has an appropriate "CHANGELOG: ..." label (If you are unsure of which label to add, ask the reviewers for guidance).
  • The PR follows the style guide.
  • The PR addresses the points mentioned in the codeowner checks for the files/folders changed. (See the codeowner's wiki page.)
  • The PR is assigned to an appropriate reviewer.
    • If you're a new contributor, please ask on Gitter for someone to assign a reviewer and don't tick this checkbox.
    • If you're not sure who the appropriate reviewer is, please assign to the issue's "owner" -- see the "talk-to" label on the issue. Do not only request the review but also add the reviewer as an assignee.

Copy link
Member

@seanlip seanlip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nithusha21! Just a couple suggestions/notes.

try {
MathExpression.fromLatex(answer.latex);
} catch (e) {
throw Error(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this construct cause the stacktrace of e (the part inside MathExpression) to be lost?

Copy link
Contributor Author

@nithusha21 nithusha21 Jun 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might, but I think we already have a record of that stacktrace in the issue thread, and we couldn't decipher too much about the issue from it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I saw a pattern in @bansalnitish's PR for this. We might as well use it?

https://github.com/oppia/oppia/pull/6808/files#diff-06e549f3712a3cf2db2270030f7c4c33R35

@codecov
Copy link

codecov bot commented Jun 2, 2019

Codecov Report

Merging #6833 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #6833   +/-   ##
========================================
  Coverage    94.99%   94.99%           
========================================
  Files          371      371           
  Lines        50628    50628           
========================================
  Hits         48094    48094           
  Misses        2534     2534

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 52f94ca...966b7f4. Read the comment docs.

@oppiabot
Copy link

oppiabot bot commented Jun 7, 2019

Hi @nithusha21. Due to recent changes in the "develop" branch, this PR now has a merge conflict. Please follow this link if you need help resolving the conflict, so that the PR can be merged. Thanks!

Copy link
Member

@seanlip seanlip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also LGTM from my end.

@kevinlee12 @ankita240796 could you please do codeowner review?

Copy link
Contributor

@kevinlee12 kevinlee12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@kevinlee12 kevinlee12 removed their assignment Jun 8, 2019
Copy link
Contributor

@ankita240796 ankita240796 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks @nithusha21

@ankita240796 ankita240796 removed their assignment Jun 15, 2019
@seanlip seanlip merged commit 9658729 into develop Jun 15, 2019
@seanlip seanlip deleted the fix-server-errors branch June 15, 2019 05:52
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

Successfully merging this pull request may close these issues.

4 participants