File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
components/ResourceDetails Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ import { useAtomValue } from 'jotai';
3131import { columnLayoutAtom } from 'state/columnLayoutAtom' ;
3232import BannerCarousel from 'shared/components/FeatureCard/BannerCarousel' ;
3333import { ResourceCustomStatusColumns } from './ResourceCustomStatusColumns' ;
34+ import { isEmpty } from 'lodash' ;
3435
3536// This component is loaded after the page mounts.
3637// Don't try to load it on scroll. It was tested.
@@ -112,7 +113,7 @@ function ResourceDetailsRenderer(props) {
112113 } , [ JSON . stringify ( resource ) , props . disableEdit ] ) ;
113114
114115 if ( loading ) return < Spinner /> ;
115- if ( error ) {
116+ if ( error && isEmpty ( resource ) ) {
116117 if ( error . code === 404 ) {
117118 return (
118119 < ResourceNotFound
Original file line number Diff line number Diff line change @@ -105,7 +105,9 @@ const useGetHook = (processDataFn) =>
105105 previousRequestNotFinished . current = null ;
106106 if ( typeof onDataReceived === 'function' )
107107 onDataReceived ( { error : e } ) ;
108- setTimeout ( ( _ ) => processError ( e ) ) ;
108+ // Let's wait a moment, because the current request may load
109+ // and showing the error to the user will not be necessary.
110+ setTimeout ( ( _ ) => processError ( e ) , 100 ) ;
109111 }
110112
111113 if ( ! isSilent && ! abortController . current . signal . aborted )
You can’t perform that action at this time.
0 commit comments