Title: Include typer-based exit for all interfaces · Issue #462 · usethis-python/usethis-python · GitHub
Open Graph Title: Include typer-based exit for all interfaces · Issue #462 · usethis-python/usethis-python
X Title: Include typer-based exit for all interfaces · Issue #462 · usethis-python/usethis-python
Description: Motivation I suppose this should really be ensured using a decorator or something, but it's been forgotten to have code to catch errors properly. We should be doing something like this for all interface functions: except UsethisError as ...
Open Graph Description: Motivation I suppose this should really be ensured using a decorator or something, but it's been forgotten to have code to catch errors properly. We should be doing something like this for all inte...
X Description: Motivation I suppose this should really be ensured using a decorator or something, but it's been forgotten to have code to catch errors properly. We should be doing something like this for all ...
Opengraph URL: https://github.com/usethis-python/usethis-python/issues/462
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Include typer-based exit for all interfaces","articleBody":"**Motivation**\nI suppose this should really be ensured using a decorator or something, but it's been forgotten to have code to catch errors properly. We should be doing something like this for all interface functions:\n\n```Python\n except UsethisError as err:\n err_print(err)\n raise typer.Exit(code=1) from None\n```\n\n**Summary of desired enhancement**\nCatch all errors and raise in the `typer` framework. Consider a way to make sure this happens in the future through some kind of automation.\n","author":{"url":"https://github.com/nathanjmcdougall","@type":"Person","name":"nathanjmcdougall"},"datePublished":"2025-04-03T10:52:41.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/462/usethis-python/issues/462"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:36e780ed-e9c8-8d4f-6904-fadf559edae2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9B46:153295:121AD0B:18A8B01:6A507CE9 |
| html-safe-nonce | f6295af3f24f68bfea63951e071fa3ca4bb448dc62a57ebe88fa836bf6a9937c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QjQ2OjE1MzI5NToxMjFBRDBCOjE4QThCMDE6NkE1MDdDRTkiLCJ2aXNpdG9yX2lkIjoiMTY5NzI4Njk2NDUyMzMzNDg4OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 307fdc5796f63a06471d9c593fb73306dd1070d7cd21d40d61474209445f5e46 |
| hovercard-subject-tag | issue:2969170988 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/usethis-python/usethis-python/462/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ce6f2b913d78e48084ebfed456af7c69be0383dddb190acba3d61f39d88203ff/usethis-python/usethis-python/issues/462 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ce6f2b913d78e48084ebfed456af7c69be0383dddb190acba3d61f39d88203ff/usethis-python/usethis-python/issues/462 |
| og:image:alt | Motivation I suppose this should really be ensured using a decorator or something, but it's been forgotten to have code to catch errors properly. We should be doing something like this for all inte... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nathanjmcdougall |
| hostname | github.com |
| expected-hostname | github.com |
| None | d6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb |
| turbo-cache-control | no-preview |
| go-import | github.com/usethis-python/usethis-python git https://github.com/usethis-python/usethis-python.git |
| octolytics-dimension-user_id | 216362695 |
| octolytics-dimension-user_login | usethis-python |
| octolytics-dimension-repository_id | 842189705 |
| octolytics-dimension-repository_nwo | usethis-python/usethis-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 842189705 |
| octolytics-dimension-repository_network_root_nwo | usethis-python/usethis-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7ac0ad2f2c7e4b9056617355fd9e33e22b0c8df9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width