@@ -172,7 +172,7 @@ import type { ValueOrError } from "#src/util/error.js";
172172import { makeValueOrError , valueOrThrow } from "#src/util/error.js" ;
173173import { EventActionMap } from "#src/util/event_action_map.js" ;
174174import { mat4 , vec3 , vec4 } from "#src/util/geom.js" ;
175- import { fetchOk , HttpError , isNotFoundError } from "#src/util/http_request.js" ;
175+ import { fetchOk , HttpError } from "#src/util/http_request.js" ;
176176import {
177177 parseArray ,
178178 parseFixedLengthArray ,
@@ -451,21 +451,16 @@ async function getMeshMetadata(
451451 url : string ,
452452 options : Partial < ProgressOptions > ,
453453) : Promise < ParsedMeshMetadata > {
454- let metadata : any ;
455- try {
456- metadata = await getJsonMetadata (
457- sharedKvStoreContext ,
458- url ,
459- /*required=*/ false ,
460- options ,
461- ) ;
462- } catch ( e ) {
463- if ( isNotFoundError ( e ) ) {
464- // If we fail to fetch the info file, assume it is the legacy
465- // single-resolution mesh format.
466- return { metadata : undefined } ;
467- }
468- throw e ;
454+ const metadata = await getJsonMetadata (
455+ sharedKvStoreContext ,
456+ url ,
457+ /*required=*/ false ,
458+ options ,
459+ ) ;
460+ if ( metadata === undefined ) {
461+ // If the info file is missing, assume it is the legacy
462+ // single-resolution mesh format.
463+ return { metadata : undefined } ;
469464 }
470465 return parseMeshMetadata ( metadata ) ;
471466}
0 commit comments