File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
src/packages/core/validation/context Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -60,9 +60,12 @@ export class UmbServerModelValidationContext
60
60
if ( ! this . #isValid) {
61
61
// We are missing some typing here, but we will just go wild with 'as any': [NL]
62
62
const readErrorBody = ( error as any ) . body ;
63
- Object . keys ( readErrorBody . errors ) . forEach ( ( path ) => {
64
- this . #serverFeedback. push ( { path, messages : readErrorBody . errors [ path ] } ) ;
65
- } ) ;
63
+ // Check if there are validation errors, since the error might be a generic ApiError
64
+ if ( readErrorBody ?. errors ) {
65
+ Object . keys ( readErrorBody . errors ) . forEach ( ( path ) => {
66
+ this . #serverFeedback. push ( { path, messages : readErrorBody . errors [ path ] } ) ;
67
+ } ) ;
68
+ }
66
69
}
67
70
68
71
this . #validatePromiseResolve?.( ) ;
You can’t perform that action at this time.
0 commit comments