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

Use normalizeError for CreateContainerError #6755

Closed
markfields opened this issue Jul 15, 2021 · 1 comment · Fixed by #6940
Closed

Use normalizeError for CreateContainerError #6755

markfields opened this issue Jul 15, 2021 · 1 comment · Fixed by #6940
Assignees
Milestone

Comments

@markfields
Copy link
Member

CreateContainerError was largely the inspiration for annotateError, the idea being it takes arbitrary input and coerces it to an IErrorBase - notably containing an errorType.

During the design phase (see #6676) we realized that we only should wrap errors when there's a new abstraction we're trying to achieve, e.g. for ContainerWarnings. But that's not the case for CreateContainerError - we're really just trying to ensure it has the right shape/features for logging. annotateError will provide all this functionality as of #6750. This issue will probably be fixed in the same PR but calling it out as a specific improvement to make.

@markfields markfields self-assigned this Jul 15, 2021
@markfields markfields added this to the July 2021 milestone Jul 15, 2021
@markfields
Copy link
Member Author

Update: We've decided there's no value in preserving the original shape/instance of an untrusted error, so CreateContainerError will still "wrap" untrusted errors - but it'll do it via normalizeError, which returns as-is if the error is of a known shape (IFluidErrorBase).

@markfields markfields changed the title Stop wrapping errors in CreateContainerError Use normalizeError for CreateContainerError Jul 31, 2021
@anthony-murphy anthony-murphy modified the milestones: July 2021, August 2021 Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants