diff --git a/editor/src/core/property-controls/property-controls-local.spec.tsx b/editor/src/core/property-controls/property-controls-local.spec.tsx index 8fbdc77508ac..f5279a5e828e 100644 --- a/editor/src/core/property-controls/property-controls-local.spec.tsx +++ b/editor/src/core/property-controls/property-controls-local.spec.tsx @@ -409,7 +409,7 @@ describe('registered property controls', () => { fileName: '/utopia/components.utopia.js', message: "Validation failed: Component registered for key 'Card' is undefined", passTime: null, - severity: 'fatal', + severity: 'warning', source: 'component-descriptor', startColumn: null, startLine: null, @@ -625,7 +625,7 @@ describe('registered property controls', () => { message: 'Validation failed: Component name (Card) does not match the registration key (Cart)', passTime: null, - severity: 'fatal', + severity: 'warning', source: 'component-descriptor', startColumn: null, startLine: null, @@ -677,7 +677,7 @@ describe('registered property controls', () => { message: 'Validation failed: Module name (/src/card) does not match the module key (/src/cardd)', passTime: null, - severity: 'fatal', + severity: 'warning', source: 'component-descriptor', startColumn: null, startLine: null, @@ -729,7 +729,7 @@ describe('registered property controls', () => { message: 'Validation failed: Component name (View) does not match the registration key (Vieww)', passTime: null, - severity: 'fatal', + severity: 'warning', source: 'component-descriptor', startColumn: null, startLine: null, @@ -781,7 +781,7 @@ describe('registered property controls', () => { message: 'Validation failed: Module name (utopia-api) does not match the module key (utopia-apii)', passTime: null, - severity: 'fatal', + severity: 'warning', source: 'component-descriptor', startColumn: null, startLine: null, @@ -832,7 +832,7 @@ describe('registered property controls', () => { message: 'Validation failed: Component name (Card) does not match the registration key (Cart)', passTime: null, - severity: 'fatal', + severity: 'warning', source: 'component-descriptor', startColumn: null, startLine: null, @@ -2069,7 +2069,7 @@ describe('Lifecycle management of registering components', () => { fileName: '/utopia/components.utopia.js', message: "Validation failed: Component registered for key 'Card' is undefined", passTime: null, - severity: 'fatal', + severity: 'warning', source: 'component-descriptor', startColumn: null, startLine: null, diff --git a/editor/src/core/property-controls/property-controls-local.ts b/editor/src/core/property-controls/property-controls-local.ts index e67d3a13ff10..993176463979 100644 --- a/editor/src/core/property-controls/property-controls-local.ts +++ b/editor/src/core/property-controls/property-controls-local.ts @@ -99,7 +99,7 @@ import { jsxElementNameFromString, jsxTextBlock, } from '../shared/element-template' -import type { ErrorMessage } from '../shared/error-messages' +import type { ErrorMessage, ErrorMessageSeverity } from '../shared/error-messages' import { errorMessage } from '../shared/error-messages' import { dropFileExtension } from '../shared/file-utils' import type { FancyError } from '../shared/code-exec-utils' @@ -418,7 +418,11 @@ async function getComponentDescriptorPromisesFromParseResult( } } -function simpleErrorMessage(fileName: string, error: string): ErrorMessage { +function simpleErrorMessage( + fileName: string, + error: string, + severity: ErrorMessageSeverity = 'fatal', +): ErrorMessage { return errorMessage( fileName, null, @@ -426,7 +430,7 @@ function simpleErrorMessage(fileName: string, error: string): ErrorMessage { null, null, '', - 'fatal', + severity, '', error, '', @@ -490,6 +494,7 @@ function errorsFromComponentRegistration( `Validation failed: ${messageForComponentRegistrationValidationError( error.validationError, )}`, + 'warning', ), ] default: