diff --git a/client/src/components/Pages/Summary/Invalid/Invalid.tsx b/client/src/components/Pages/Summary/Invalid/Invalid.tsx index 757bdf02..e1978ade 100644 --- a/client/src/components/Pages/Summary/Invalid/Invalid.tsx +++ b/client/src/components/Pages/Summary/Invalid/Invalid.tsx @@ -101,10 +101,9 @@ export const Invalid: React.FC = ({ const unknownError = ( <> - - We were unable to parse the validation failure for this fusion: - -
{validationErrors}
+ {validationErrors.map((error) => ( +
{error}
+ ))} ); diff --git a/client/src/components/Pages/Summary/Main/Summary.tsx b/client/src/components/Pages/Summary/Main/Summary.tsx index 14b0605e..976938ea 100644 --- a/client/src/components/Pages/Summary/Main/Summary.tsx +++ b/client/src/components/Pages/Summary/Main/Summary.tsx @@ -104,13 +104,7 @@ export const Summary: React.FC = ({ setVisibleTab }) => { // make request validateFusion(formattedFusion).then((response) => { if (response.warnings && response.warnings?.length > 0) { - if ( - validationErrors !== null && - JSON.stringify(response.warnings.sort()) !== - JSON.stringify(validationErrors.sort()) - ) { - setValidationErrors(response.warnings); - } + setValidationErrors(response.warnings); } else { setValidationErrors([]); setValidatedFusion( diff --git a/server/src/curfu/routers/validate.py b/server/src/curfu/routers/validate.py index 8ee72c54..38a85fec 100644 --- a/server/src/curfu/routers/validate.py +++ b/server/src/curfu/routers/validate.py @@ -32,7 +32,7 @@ def validate_fusion(request: Request, fusion: dict = Body()) -> ResponseDict: try: verified_fusion = fusor.fusion(**fusion) except FUSORParametersException as e: - response["warnings"] = [str(e)] + response["warnings"] = str(e).split("\n") else: response["fusion"] = verified_fusion return response