NOT_FOUND

This error is thrown when a route or a resource cannot be found, for example if you're requesting a non-existent product handle or asset.

NotFoundErrorHTTP 404GenericErrorKind

Possible causes

  • Requesting an invalid/non-existent resource.
  • Requesting a previously removed resource.
  • Trying to access a non-existent path or route.

How it's thrown

@nordcom/commerce-errors
const product = await product(handle);
if (product) return product;

throw new NotFoundError();

Thrown from

packages/db/src/services/service.ts:124
throw new NotFoundError(this.backend.name);
View ↗
packages/errors/src/index.ts:1157
* throw new NotFoundError('product:some-handle');
View ↗
apps/storefront/src/api/shopify/brand.ts:81
throw new NotFoundError(`"Shop" on shop "${shop.id}"`);
View ↗
apps/storefront/src/api/shopify/collection/api.ts:73
throw new NotFoundError(`"Collection" with the handle "${handle}" on shop "${shop.id}"`);
View ↗
apps/storefront/src/api/shopify/collection/api.ts:111
throw new NotFoundError(`"Collections" cannot be found`);
View ↗
apps/storefront/src/api/shopify/product/api.ts:84
throw new NotFoundError(`"Product" with the handle "${handle}" on shop "${shop.id}"`);
View ↗
apps/storefront/src/api/shopify/product/api.ts:174
throw new NotFoundError(`"Product" on shop "${shop.id}"`);
View ↗
apps/storefront/src/api/shopify/product/api.ts:225
throw new NotFoundError(`"Product" on shop "${shop.id}"`);
View ↗
apps/storefront/src/api/shopify/recommendation.ts:56
throw new NotFoundError(`"Recommendations" for "Product" with id "${id}" on shop "${shop.id}"`);
View ↗
apps/storefront/src/api/shopify/redirects.ts:74
throw new NotFoundError(`"Redirects" on shop "${shop.id}"`);
View ↗
apps/storefront/src/api/shopify/vendor.ts:71
throw new NotFoundError(`"vendors" on shop "${shop.id}"`);
View ↗
apps/storefront/src/app/[domain]/apple-icon/route.tsx:51
throw new NotFoundError('apple-icon.png');
View ↗
apps/storefront/src/app/[domain]/favicon.png/route.tsx:86
throw new NotFoundError('favicon.png');
View ↗
apps/storefront/src/middleware/storefront.ts:160
throw new NotFoundError(`"Shop" with the handle "${hostname}" cannot be found`);
View ↗
apps/storefront/src/utils/locale/locale.ts:109
throw new NotFoundError(data);
View ↗

On this page