Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

App Proxy - Trigger 404

App Proxy - Trigger 404

shopjb
Tourist
8 0 1

Is there a way I can trigger the 404 page inside my App Proxy? Just returning a 404 status only shows a blank page.

Replies 3 (3)

Not applicable

Hi @shopjb ,

Here's a thought you can send Liquid syntax in an App Proxy response. So if you're able to send 404 why not copy the merchants 404 template code then send it as a response?

Here's some reference material: https://shopify.dev/tutorials/display-dynamic-store-data-with-app-proxies#proxy-response

Best, 

Sam - Owner @ Achieve Applabs

shopjb
Tourist
8 0 1

That works. Thanks!

alexrusin
Shopify Partner
5 0 6

Sending Liquid syntax for 404 didn't fit our case, because our app is installed on multiple Shopify stores. Different stores may have different 404 Liquid syntax.  Since Shopify doesn't trigger 404 template on 404 status, but follows 3xx redirects, we did a workaround by returning a redirect to a non-existing page 

res.redirect('/page-not-found')