You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have introduced a new error type ValidationError into aws-cdk-lib, seeerrors.ts.
This error type now needs to be rolled-out everywhere in aws-cdk-lib.
This will be a huge effort and significant grunt work. See tips below for how to make this easier.
Here is the plan:
As a team, split up the work between aws-cdk-lib and all alpha modules.
Raise small PRs, containing changes for roughly 3-5 modules
Do NOT make any other changes. If something isn't a straightforward update, park it for now.
If you are completing an alpha module (not aws-cdk-lib) make sure to add the no-throw-default-error eslint rule to its local config so we can enforce future compliance.
Once everything is done, we should enabke the no-throw-default-error eslint rule for aws-cdk-lib as well.
We might have to ignore it in a few places that are still unclear.
Tips:
Enforce using typed errors by locally! configuring the no-throw-default-error rule from cdklabs/eslint-rules for the aws-cdk-lib and or respective package. Don't commit this just yet.
Once you have done that, eslint and VSCode should flag up all rule violations and changing errors will be semi-automatic and super easy.
Consider using Amazon Q as well.
The text was updated successfully, but these errors were encountered:
We have introduced a new error type
ValidationError
intoaws-cdk-lib
, seeerrors.ts.This error type now needs to be rolled-out everywhere in
aws-cdk-lib
.This will be a huge effort and significant grunt work. See tips below for how to make this easier.
Here is the plan:
aws-cdk-lib
and all alpha modules.ValidationError
, check with @sumupitchayan to raise a separate PR to introduce a new error type and use that in a few places to illustrate its value. See Additional ConstructError types as needed (errors that are not ValidationErrors) #32570.aws-cdk-lib
) make sure to add theno-throw-default-error
eslint rule to its local config so we can enforce future compliance.Once everything is done, we should enabke the
no-throw-default-error
eslint rule foraws-cdk-lib
as well.We might have to ignore it in a few places that are still unclear.
Tips:
no-throw-default-error
rule from cdklabs/eslint-rules for theaws-cdk-lib
and or respective package. Don't commit this just yet.The text was updated successfully, but these errors were encountered: