Example app backend issue

shibley
Shopify Partner
1 0 0

Hello, 

receiving the error message below when wiring up backend ( proxy step ) from this tutorial example:

https://shopify.dev/apps/getting-started/build-app-example/connect

 

HttpResponseError: Received an error response (406 Not Acceptable) from Shopify:
backend  | If you report this error, please include this id: 5e22d279-1308-44ce-a7a0-40ce0809534e
backend  |     at HttpResponseError.ShopifyError [as constructor] (/Users/shibleyburnett/Projects/shopify/waitlist/web/node_modules/@shopify/shopify-api/dist/error.js:13:28)
backend  |     at new HttpResponseError (/Users/shibleyburnett/Projects/shopify/waitlist/web/node_modules/@shopify/shopify-api/dist/error.js:104:28)
backend  |     at HttpClient.<anonymous> (/Users/shibleyburnett/Projects/shopify/waitlist/web/node_modules/@shopify/shopify-api/dist/clients/http_client/http_client.js:248:43)
backend  |     at step (/Users/shibleyburnett/Projects/shopify/waitlist/web/node_modules/tslib/tslib.js:144:27)
backend  |     at Object.next (/Users/shibleyburnett/Projects/shopify/waitlist/web/node_modules/tslib/tslib.js:125:57)
backend  |     at fulfilled (/Users/shibleyburnett/Projects/shopify/waitlist/web/node_modules/tslib/tslib.js:115:62)
backend  |     at processTicksAndRejections (node:internal/process/task_queues:96:5) {
backend  |   response: {
backend  |     code: 406,
backend  |     statusText: 'Not Acceptable',
backend  |     body: {},
backend  |     headers: [Object: null prototype] {
backend  |       date: [ 'Sat, 27 Aug 2022 20:37:51 GMT' ],
backend  |       'content-type': [ 'application/json' ],
backend  |       'transfer-encoding': [ 'chunked' ],
backend  |       connection: [ 'close' ],
backend  |       'x-sorting-hat-podid': [ '232' ],
backend  |       'x-sorting-hat-shopid': [ '65842282729' ],
backend  |       'referrer-policy': [ 'origin-when-cross-origin' ],
backend  |       'x-frame-options': [ 'DENY' ],
backend  |       'x-shopid': [ '65842282729' ],
backend  |       'x-shardid': [ '232' ],
backend  |       'x-stats-userid': [ '' ],
backend  |       'x-stats-apiclientid': [ '7606501377' ],
backend  |       'x-stats-apipermissionid': [ '387404136681' ],
backend  |       'x-shopify-api-version': [ '2021-10' ],
backend  |       http_x_shopify_shop_api_call_limit: [ '1/40' ],
backend  |       'x-shopify-shop-api-call-limit': [ '1/40' ],
backend  |       'strict-transport-security': [ 'max-age=7889238' ],
backend  |       'x-shopify-stage': [ 'production' ],
backend  |       'content-security-policy': [
backend  |         "default-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://* shopify-pos://*; block-all-mixed-content; child-src 'self' https://* shopify-pos://*; connect-src 'self' wss://* https://*; frame-ancestors 'none'; img-src 'self' data: blob: https:; script-src https://cdn.shopify.com https://cdn.shopifycdn.net https://checkout.shopifycs.com https://api.stripe.com https://mpsnare.iesnare.com https://appcenter.intuit.com https://www.paypal.com https://js.braintreegateway.com https://c.paypal.com https://maps.googleapis.com https://www.google-analytics.com https://v.shopify.com 'self' 'unsafe-inline' 'unsafe-eval'; upgrade-insecure-requests; report-uri /csp-report?source%5Baction%5D=error_404&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Ferrors&source%5Bsection%5D=admin_api&source%5Buuid%5D=5e22d279-1308-44ce-a7a0-40ce0809534e"
backend  |       ],
backend  |       'x-content-type-options': [ 'nosniff' ],
backend  |       'x-download-options': [ 'noopen' ],
backend  |       'x-permitted-cross-domain-policies': [ 'none' ],
backend  |       'x-xss-protection': [
backend  |         '1; mode=block; report=/xss-report?source%5Baction%5D=error_404&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Ferrors&source%5Bsection%5D=admin_api&source%5Buuid%5D=5e22d279-1308-44ce-a7a0-40ce0809534e'
backend  |       ],
backend  |       'x-dc': [ 'gcp-us-west1,gcp-us-east1,gcp-us-east1' ],
backend  |       'x-request-id': [ '5e22d279-1308-44ce-a7a0-40ce0809534e' ],
backend  |       'cf-cache-status': [ 'DYNAMIC' ],
backend  |       'expect-ct': [
backend  |         'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"'
backend  |       ],
backend  |       'report-to': [
backend  |         '{"endpoints":[{"url":"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=JuGdSbqxzjc87iNyEIMM5j0e%2FA20a9lKboaMre4ciomAA%2FXs8fh0l3i18Y9W3UC0qlX61iFW%2BbTqDvshNc%2BeEtakc5Xw5fnsEA%2BJAdTcpd%2B4MA3ua62VbRGg%2FGwJ7tB7DzI9nNSNK4NHAa6J"}],"group":"cf-nel","max_age":604800}'
backend  |       ],
backend  |       nel: [
backend  |         '{"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}'
backend  |       ],
backend  |       server: [ 'cloudflare' ],
backend  |       'cf-ray': [ '74179b811cabc721-SEA' ],
backend  |       'alt-svc': [ 'h3=":443"; ma=86400, h3-29=":443"; ma=86400' ]
backend  |     }
backend  |   }
backend  | }

 

 

This is the endpoint being attempted:

const {
  data: discounts,
  isLoading: isLoadingDiscounts,
  isError: discountsError,
  /* useAppQuery makes a query to `/api/discounts`, which the backend authenticates before fetching the data from the Shopify GraphQL Admin API */
} = useAppQuery({ url: "/api/discounts" });

 

Replies 0 (0)