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

change: [M3-7250] – Properly surface VPC interface errors #9839

Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Upcoming Features
---

Removed temporary code for surfacing VPC interface errors and fixed formatting of error in Linode Config dialog ([#9839](https://github.com/linode/manager/pull/9839))
dwiley-akamai marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -304,16 +304,16 @@ export const VPCPanel = (props: VPCPanelProps) => {
</Box>
}
/>
{assignPublicIPv4Address && publicIPv4Error && (
<Typography
sx={(theme) => ({
color: theme.color.red,
})}
>
{publicIPv4Error}
</Typography>
)}
</Box>
{assignPublicIPv4Address && publicIPv4Error && (
<Typography
sx={(theme) => ({
color: theme.color.red,
})}
>
{publicIPv4Error}
</Typography>
)}
</Stack>
)}
</Stack>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -425,20 +425,9 @@ export const LinodeConfigDialog = (props: Props) => {
});
};

// @TODO VPC: Remove this override and surface the field errors appropriately
// once API fixes interface index bug for ipv4.vpc & ipv4.nat_1_1 errors
const overrideFieldForIPv4 = (error: APIError[]) => {
error.forEach((err) => {
if (err.field && ['ipv4.nat_1_1', 'ipv4.vpc'].includes(err.field)) {
err.field = 'interfaces';
}
});
};

formik.setSubmitting(false);

overrideFieldForDevices(error);
overrideFieldForIPv4(error);

handleFieldErrors(formik.setErrors, error);

Expand Down