GraphQL API productCreate mutation return Cloudflare error 520

manhnq94
Tourist
10 1 1

Hi Shopify Team,

I executed a productCreate mutation and the server responded an error with status 520, please help me solve this problem.

The query I ran:

 

createProductGraphQL = """
	mutation productCreate($input: ProductInput!) {
		productCreate(input: $input) {
			product {
				id
				images(first: 50) {
					edges {
						node {
							id
							altText
						}
					}
				}
			}
			userErrors {
				field
				message
			}
		}
	}
"""

 

 

Response header from the server:

 

{
   "Date":"Mon, 01 Feb 2021 03:42:46 GMT",
   "Content-Type":"text/html; charset=UTF-8",
   "Transfer-Encoding":"chunked",
   "Connection":"keep-alive",
   "Set-Cookie":"cf_use_ob=0; path=/; expires=Mon, 01-Feb-21 03:43:16 GMT",
   "X-Frame-Options":"SAMEORIGIN",
   "Cache-Control":"private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0",
   "Expires":"Thu, 01 Jan 1970 00:00:01 GMT",
   "CF-RAY":"61a8a95898902a63-IAD",
   "Server":"cloudflare"
}

 

 

Response text:

 

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="referrer" content="never" />
<title>Something went wrong</title>
<style type="text/css">*{box-sizing:border-box;margin:0;padding:0}html{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;background:#f1f1f1;font-size:62.5%;color:#303030;min-height:100%}body{padding:0;margin:0;line-height:2.7rem}a{color:#303030;border-bottom:1px solid #303030;text-decoration:none;padding-bottom:1rem;transition:border-color .2s ease-in}a:hover{border-bottom-color:#a9a9a9}h1{font-size:1.8rem;font-weight:400;margin:0 0 1.4rem}p{font-size:1.5rem}.page,p{margin:0}.page{padding:4rem 3.5rem;display:flex;min-height:100vh;flex-direction:column}.text-container--main{flex:1;display:flex;align-items:start;margin-bottom:1.6rem}.action{border:1px solid #a9a9a9;padding:1.2rem 2.5rem;border-radius:6px;text-decoration:none;margin-top:1.6rem;display:inline-block;font-size:1.5rem;transition:border-color .2s ease-in}.action:hover{border-color:#000}@media (min-width:500px){.text-container--main{align-items:center}.page{padding:7.5rem 10.5rem}}.cf-injected-html{display:none}</style>
</head>
<body class="status-error status-code-500">
<div class="page">
<div class="text-container text-container--main">
<div>
<h1 data-i18n="content-title">There was a problem loading this website</h1>
<p data-i18n="try-refreshing">Try refreshing the page.</p>
<p data-i18n="try-again">If the site still doesn't load, please try again in a few minutes.</p>
<a href="." class="action" data-i18n="refresh-page">Refresh Page</a>
</div>
</div>
<div class="cf-injected-html"><div class="cf-error-details cf-error-520">
<h1>Web server is returning an unknown error</h1>
<p>There is an unknown connection issue between Cloudflare and the origin web server. As a result, the web page can not be displayed.</p>
<ul>
<li>Ray ID: 61a8a95898902a63</li>
<li>Your IP address: 18.225.5.118</li>
<li>Error reference number: 520</li>
<li>Cloudflare Location: Ashburn</li>
</ul>
</div>
</div>
</div>
<script>var t={ms:{title:"Sesuatu tidak kena","content-title":"Terdapat masalah memuatkan laman web ini","try-refreshing":"Cuba segar semula halaman.","try-again":"Jika laman web ini masih tidak memuatkan, sila cuba lagi dalam beberapa minit.","refresh-page":"Segar Semula Halaman"},nl:{title:"Er is iets misgegaan","content-title":"Er is een probleem opgetreden bij het laden van deze website","try-refreshing":"Laad de pagina opnieuw.","try-again":"Als de site nog steeds niet laadt, probeer het over een paar minuten opnieuw.","refresh-page":"Pagina opnieuw laden"},fr:{title:"Une erreur s'est produite","content-title":"Un problème est survenu lors du chargement de ce site web","try-refreshing":"Essayez d'actualiser la page.","try-again":"Si le site ne s'affiche toujours pas, veuillez réessayer dans quelques minutes.","refresh-page":"Rafraîchir la page"},en:{title:"Something went wrong","content-title":"There was a problem loading this website","try-refreshing":"Try refreshing the page.","try-again":"If the site still doesn't load, please try again in a few minutes.","refresh-page":"Refresh Page"},da:{title:"Der opstod en fejl","content-title":"Der opstod en fejl under indlæsning af dette website","try-refreshing":"Prøv at opdatere siden.","try-again":"Hvis websitet ikke indlæses, kan du prøve igen om nogle få minutter.","refresh-page":"Opdater siden"},de:{title:"Irgendetwas ist schiefgelaufen","content-title":"Beim Laden dieser Website ist ein Fehler aufgetreten.","try-refreshing":"Versuche, die Seite zu aktualisieren.","try-again":"Wenn die Seite immer noch nicht geladen wird, versuche es bitte in ein paar Minuten erneut.","refresh-page":"Seite neu laden"},"pt-BR":{title:"Ocorreu um erro","content-title":"Ocorreu um problema ao carregar o site","try-refreshing":"Tente atualizar a página.","try-again":"Se o site ainda não carregar, tente novamente dentro de alguns minutos.","refresh-page":"Atualizar a página"},sv:{title:"Ett fel uppstod","content-title":"Det gick inte att ladda den här webbplatsen","try-refreshing":"Försök uppdatera sidan.","try-again":"Försök igen om några minuter om webbplatsen fortfarande inte laddas.","refresh-page":"Uppdatera sida"},hi:{title:"कुछ गलत हुआ","content-title":"इस वेबसाइट को लोड करने में समस्या हुई","try-refreshing":"पृष्ठ रीफ़्रेश करके देखें.","try-again":"यदि साइट अभी तक लोड नहीं हुई है, तो कृपया कुछ मिनटों में फिर से कोशिश करें.","refresh-page":"पेज को रीफ़्रेश करें"},cs:{title:"Něco se pokazilo","content-title":"Při načítání této webové stránky došlo k chybě","try-refreshing":"Zkuste obnovit stránku.","try-again":"Pokud se stránka ani přesto nenačte, zkuste to znovu za pár minut.","refresh-page":"Obnovit stránku"},"zh-TW":{title:"發生問題","content-title":"系統載入此網站時發生問題","try-refreshing":"請嘗試重新整理頁面。","try-again":"如果網站仍未載入,請於幾分鐘後再試。","refresh-page":"重新整理頁面"},nb:{title:"Noe gikk galt","content-title":"Det oppsto et problem ved lasting av denne nettsiden","try-refreshing":"Prøv å oppdatere siden.","try-again":"Hvis nettstedet fortsatt ikke lastes inn, kan du prøve igjen om noen minutter.","refresh-page":"Oppdater siden"},"pt-PT":{title:"Ocorreu um erro","content-title":"Ocorreu um erro ao carregar este website","try-refreshing":"Tente atualizar a página.","try-again":"Se o site continua a não carregar, tente novamente dentro de alguns minutos.","refresh-page":"Atualizar página"},fi:{title:"Jotain meni pieleen","content-title":"Tämän verkkosivun lataamisessa oli ongelma","try-refreshing":"Yritä päivittää sivu.","try-again":"Jos sivu ei vieläkään lataudu, yritä uudelleen muutaman minuutin kuluttua.","refresh-page":"Päivitä sivu"},pl:{title:"Coś poszło nie tak","content-title":"Podczas ładowania tej strony internetowej wystąpił problem","try-refreshing":"Spróbuj odświeżyć stronę.","try-again":"Jeśli strona nadal się nie ładuje, spróbuj ponownie za kilka minut.","refresh-page":"Odśwież stronę"},tr:{title:"Bir sorun oluştu","content-title":"Bu web sitesi yüklenirken sorun oluştu","try-refreshing":"Sayfayı yenilemeyi deneyin.","try-again":"Sayfa hâlâ yüklenmiyorsa lütfen birkaç dakika sonra tekrar deneyin.","refresh-page":"Sayfayı Yenile"},ko:{title:"문제가 발생했습니다.","content-title":"이 웹사이트를 로드하는 중 문제가 발생했습니다.","try-refreshing":"페이지를 새로 고침해 보십시오.","try-again":"그래도 사이트가 로드되지 않으면 몇 분 후에 다시 시도하십시오.","refresh-page":"페이지 새로 고침"},es:{title:"Se produjo un error","content-title":"Se ha producido un error al descargar el sitio","try-refreshing":"Intenta actualizar la página.","try-again":"Si el sitio no se descarga, por favor, inténtalo de nuevo en unos minutos.","refresh-page":"Actualizar la página"},ja:{title:"問題が発生しました","content-title":"このウェブサイトを読み込む際に問題が発生しました","try-refreshing":"ページを更新してください。","try-again":"サイトが読み込まれない場合は、数分後にもう一度お試しください。","refresh-page":"ページを更新する"},th:{title:"เกิดข้อผิดพลาดขึ้น","content-title":"เกิดปัญหาในการโหลดเว็บไซต์นี้","try-refreshing":"ลองรีเฟรชหน้านี้อีกครั้ง","try-again":"หากไซต์ดังกล่าวยังไม่โหลด โปรดลองอีกครั้งในอีกสักครู่","refresh-page":"รีเฟรชหน้า"},"zh-CN":{title:"出现错误","content-title":"加载此网站时出现问题","try-refreshing":"请尝试刷新页面。","try-again":"如果网站仍未加载,请在几分钟后重试。","refresh-page":"刷新页面"},it:{title:"Si è verificato un errore","content-title":"Si è verificato un problema nel caricamento di questo sito web","try-refreshing":"Prova ad aggiornare la pagina.","try-again":"Se il sito ancora non si carica, per favore riprova tra qualche minuto.","refresh-page":"Aggiorna pagina"}},language=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage||"en";for(var id in translations=t[language=language.split("-")[0]]||t.en,translations)target=document.querySelector("[data-i18n="+id+"]"),null!=target&&(target.innerHTML=translations[id]);document.title=translations.title,t[language]&&document.getElementsByTagName("html")[0].setAttribute("lang",language);</script>
</body>
</html>

 

Error happened at 2021-02-01T10:42:46.626+07:00

0 Likes
Greg_Kujawa
Shopify Partner
965 80 204

Can you perform a test GQL request in the GraphiQL app and see what comes back? Sometimes the Cloudflare kickbacks can be due to false positive IP blocks on that provider's end. Especially if you are consistently getting the error and it's not an anomaly. 

0 Likes