2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-02-19 13:18:03 +00:00

[UI] Log Form error (#11363)

* [UI] Log console error for invalid field

- Help catch form issues during CI

* Use console logging
This commit is contained in:
Oliver
2026-02-18 14:15:34 +11:00
committed by GitHub
parent 7c92ecbe90
commit f6206305d5

View File

@@ -241,6 +241,11 @@ export function ApiFormField({
/> />
); );
default: default:
// This should never happen - it represents a critical UI issue which should be caught in CI
console.error(
`Invalid field type for field '${fieldName}': '${fieldDefinition.field_type}'`
);
return ( return (
<Alert color='red' title={t`Error`}> <Alert color='red' title={t`Error`}>
Invalid field type for field '{fieldName}': ' Invalid field type for field '{fieldName}': '