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

Update error classes to implement IFluidErrorBase #6754

Closed
markfields opened this issue Jul 15, 2021 · 3 comments · Fixed by #7227 or #7454
Closed

Update error classes to implement IFluidErrorBase #6754

markfields opened this issue Jul 15, 2021 · 3 comments · Fixed by #7227 or #7454
Assignees

Comments

@markfields
Copy link
Member

Follow-on to #6749. Any error we raise ourselves should be an IFluidErroBase. They already are Error and have an errorType (already true due to IErrorBase and IDriverErrorBase), so this just means add fluidErrorCode.

This will also involve updating call sites to ensure we pass a valid (static) string as error code, and pull any variable stuff into other properties.

@markfields markfields assigned markfields and ksbrar and unassigned markfields Jul 15, 2021
@markfields markfields added this to the July 2021 milestone Jul 15, 2021
@markfields
Copy link
Member Author

This is a big chunk of #5426. Might be broken into a few PRs, might not all fit in July, but we'll at least get started.

@markfields
Copy link
Member Author

Closing this as a dupe of #5426 at this point. Going to split out a few specific cases to prioritize, and otherwise we'll just do this as need arises. normalizeError handles so-called "valid legacy errors" which have only errorType and message (and telemetry prop functions), so it's ok to do this piecemeal.

Also, related to #6980 since we'll have to mention IFluidErrorBase on each class rather than updating IErrorBase or IDriverErrorBase. Doesn't actually block, just mentioning it.

@markfields markfields reopened this Aug 5, 2021
@markfields
Copy link
Member Author

markfields commented Aug 5, 2021

This is a useful and bite-sized piece of #5426 so reopening as such.

Steps:

  • Find all classes extending LoggingError
  • Add implements IFluidErrorBase and add property readonly fluidErrorCode to constructor
  • Update usages. This will take some thought. Default value can be basically function name of caller. Should be pascaleCase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants