diff --git a/web/crux/src/app/registry/registry-clients/v2-http-api-client.ts b/web/crux/src/app/registry/registry-clients/v2-http-api-client.ts index 3d8fc4003..5bf7744b3 100644 --- a/web/crux/src/app/registry/registry-clients/v2-http-api-client.ts +++ b/web/crux/src/app/registry/registry-clients/v2-http-api-client.ts @@ -414,24 +414,36 @@ export default class V2HttpApiClient { } async fetchLabels(image: string, tag: string): Promise> { - const tagManifest = await this.fetchTagManifest(image, tag) - if (!tagManifest) { + try { + const tagManifest = await this.fetchTagManifest(image, tag) + if (!tagManifest) { + return {} + } + + return this.fetchLabelsByManifest(image, tagManifest, 0) + } catch (err: any) { + this.logger.error(`Failed to fetch labels '${image}:${tag}'`) + this.logger.error(`${err.name} ${err.message}`, err.stack) return {} } - - return this.fetchLabelsByManifest(image, tagManifest, 0) } async fetchTagInfo(image: string, tag: string): Promise { - const tagManifest = await this.fetchTagManifest(image, tag) - if (!tagManifest) { - return null - } + try { + const tagManifest = await this.fetchTagManifest(image, tag) + if (!tagManifest) { + return null + } - const configBlob = await this.fetchConfigBlobByManifest(image, tagManifest, 0) + const configBlob = await this.fetchConfigBlobByManifest(image, tagManifest, 0) - return { - created: configBlob.created, + return { + created: configBlob.created, + } + } catch (err: any) { + this.logger.error(`Failed to fetch tag info '${image}:${tag}'`) + this.logger.error(`${err.name} ${err.message}`, err.stack) + return null } } }