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

Send JSON error instead of entire 500 page error on autograde error #1679

Merged
merged 5 commits into from
Jan 9, 2023

Conversation

michellexliu
Copy link
Contributor

Description

When there's an error in the partial feedback request a json { error: "Get partial feedback request failed: #{e}" } with status internal_server_error gets rendered instead of a full 500 error page.

Motivation and Context

Previously, if there's an autograding error, the error gets properly caught in the javascript of viewFeedback and functionally everything was fine, but the error response that gets sent is the HTML for the entire donkey 500 error page, which makes the response slower. This PR will return a simpler JSON.

Error response before:
Screen Shot 2023-01-07 at 1 02 06 PM

Error response after:
Screen Shot 2023-01-07 at 1 05 24 PM

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have run rubocop for style check. If you haven't, run overcommit --install && overcommit --sign to use pre-commit hook for linting
  • My change requires a change to the documentation, which is located at Autolab Docs
  • I have updated the documentation accordingly, included in this PR

Copy link
Contributor

@victorhuangwq victorhuangwq left a comment

Choose a reason for hiding this comment

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

LGTM

@michellexliu michellexliu merged commit c3b7611 into master Jan 9, 2023
@michellexliu michellexliu deleted the json-error branch January 9, 2023 17:47
cg2v pushed a commit to cg2v/Autolab that referenced this pull request Jan 10, 2023
…utolab#1679)

* Update Slack invite links

* updated docs

* docker-compose slack invite

* render json error instead of full 500 error
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.

2 participants