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

Lint rule for AmplifyUserError and AmplifyFault #1293

Open
edwardfoyle opened this issue Apr 12, 2024 · 1 comment
Open

Lint rule for AmplifyUserError and AmplifyFault #1293

edwardfoyle opened this issue Apr 12, 2024 · 1 comment
Labels
repo-infrastructure Engineering label for issues related to repo infrastructure tech-debt Refactors, unsavory workarounds or other technical decisions that should be revisited later

Comments

@edwardfoyle
Copy link
Contributor

edwardfoyle commented Apr 12, 2024

Description

We should lint for the use of the Error base class and point developers to use AmplifyUserError or AmplifyFault instead.

Using Error in tests or scripts should continue to be allowed

@edwardfoyle edwardfoyle added tech-debt Refactors, unsavory workarounds or other technical decisions that should be revisited later repo-infrastructure Engineering label for issues related to repo infrastructure labels Apr 12, 2024
@sobolk
Copy link
Member

sobolk commented Sep 3, 2024

In addition . Usage of AmplifyUserError and AmplifyFault in CDK packages should be forbidden. (which could be separate rule).

Perhaps we need two rules:

  1. no-amplify-errors (to cover the above comment)
  2. prefer-amplify-errors (to cover original ask above)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
repo-infrastructure Engineering label for issues related to repo infrastructure tech-debt Refactors, unsavory workarounds or other technical decisions that should be revisited later
Projects
None yet
Development

No branches or pull requests

2 participants