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

Nicer handling of job not found on the job details view #295

Merged
merged 2 commits into from
Jul 12, 2024

Conversation

plars
Copy link
Contributor

@plars plars commented Jun 28, 2024

Description

You won't get there accidentally by clicking, but if you try to go to the job details page for an invalid job_id, you'll get a confusing error response of Unhandled Exception: 'None' has no attribute 'job_data' and it'll hit the server logs as an error because we aren't handling it. This just makes a nicer 404 page for it like we did for the similar situation with agent details

Resolved issues

N/A

Documentation

N/A

Web service API changes

N/A

Tests

Added unit test and also tested locally

@plars plars requested a review from a team June 28, 2024 16:20
nancyc12
nancyc12 previously approved these changes Jul 3, 2024
Copy link
Contributor

@nancyc12 nancyc12 left a comment

Choose a reason for hiding this comment

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

Thanks for the changes! It looks good to me. Just added a small suggestion.

server/src/views.py Outdated Show resolved Hide resolved
Co-authored-by: Nancy Chen <nancy.chen@canonical.com>
Copy link
Contributor

@nancyc12 nancyc12 left a comment

Choose a reason for hiding this comment

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

LGTM+1

@plars plars merged commit 30ab937 into main Jul 12, 2024
1 check passed
@plars plars deleted the handle-job-not-found branch July 12, 2024 20:19
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