@@ -153,8 +153,18 @@ function ShexValidate(props) {
153153 const { type, content } = messageData ;
154154 switch ( type ) {
155155 case API . queryParameters . streaming . responseTypes . result :
156- // Result received, update result list with it if not errored
157- if ( content . status != errored ) setResults ( [ content , ...results ] ) ;
156+ // We got a result with an embedded error message, set error
157+ if ( ! Array . isArray ( content ?. report ?. shapeMap ) ) {
158+ setStreamValidationError (
159+ content ?. report ?. message ||
160+ API . texts . streamingTexts . unknownError
161+ ) ;
162+ // Stream was not stopped, so we disconnect ourselves
163+ stopStreamingValidation ( ) ;
164+ }
165+ // Result received, update result list with it after checking that it is not errored (and thus omitted)
166+ else if ( content . status != errored )
167+ setResults ( [ content , ...results ] ) ;
158168 break ;
159169 case API . queryParameters . streaming . responseTypes . error :
160170 // Stream was stopped, show/handle errors, set state...
@@ -531,7 +541,7 @@ function ShexValidate(props) {
531541 </ Button >
532542 </ Form >
533543 </ Col >
534- { loading || results || permalink || error ? (
544+ { loading || results . length || permalink || error ? (
535545 < Col className = { "half-col" } >
536546 { loading ? (
537547 < ProgressBar
0 commit comments