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

Better error messages #245

Merged
merged 14 commits into from
Dec 11, 2023
Merged

Better error messages #245

merged 14 commits into from
Dec 11, 2023

Conversation

nleroy917
Copy link
Member

Error messages were really bad. This update looks to improve them by standardizing two things:

  1. Always using fastapi.HTTPException when something predictable goes wrong serverside and communicating this with the detail attribute in HTTPException.__init__().
  2. Looking for the detail in the server response inside a standard extractErrorMessage on the UI. This function should be called in all useMutation hooks to make sure things are caught properly.

Also:

  • Mild clean up
  • Upgrade to @tanstack/react-router v5

yaml_dict = yaml.safe_load(updated_project.project_config_yaml)
try:
yaml_dict = yaml.safe_load(updated_project.project_config_yaml)
except yaml.scanner.ScannerError as e:
Copy link
Member

Choose a reason for hiding this comment

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

Nice!

Copy link

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5b576b6
Status: ✅  Deploy successful!
Preview URL: https://ebe565e9.pephub.pages.dev

View logs

@nleroy917 nleroy917 merged commit f6fb1a6 into master Dec 11, 2023
2 checks passed
@nleroy917 nleroy917 mentioned this pull request Dec 14, 2023
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.

3 participants