File tree Expand file tree Collapse file tree
packages/components/src/internal/components/lineage Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -279,30 +279,32 @@ export class ServerLineageAPIWrapper implements LineageAPIWrapper {
279279 return new Promise ( ( resolve , reject ) => {
280280 const seed = options . lsid ;
281281
282+ function failure ( error ?: { exception : string ; exceptionClass ?: string } ) : void {
283+ let message = `Failed to fetch lineage for seed "${ seed } ".` ;
284+
285+ if ( error ?. exception ) {
286+ message = error . exception ;
287+
288+ // When a server exception occurs
289+ if ( error . exceptionClass ) {
290+ message = `${ error . exceptionClass } : ` + error . exception ;
291+ }
292+ }
293+
294+ reject ( { message, seed } ) ;
295+ }
296+
282297 Experiment . lineage ( {
283298 ...options ,
284299 success : lineage => {
285- resolve ( LineageResult . create ( lineage ) ) ;
286- } ,
287- failure : error => {
288- let message = `Failed to fetch lineage for seed "${ seed } ".` ;
289-
290- if ( error ) {
291- if ( error . exception ) {
292- message = error . exception ;
293-
294- // When a server exception occurs
295- if ( error . exceptionClass ) {
296- message = `${ error . exceptionClass } : ` + error . exception ;
297- }
298- }
300+ // Issue 53149: Lineage loads undefined object
301+ if ( lineage ) {
302+ resolve ( LineageResult . create ( lineage ) ) ;
303+ } else {
304+ failure ( ) ;
299305 }
300-
301- reject ( {
302- seed,
303- message,
304- } ) ;
305306 } ,
307+ failure,
306308 } ) ;
307309 } ) ;
308310 } ;
You can’t perform that action at this time.
0 commit comments