[{"data":1,"prerenderedAt":521},["ShallowReactive",2],{"sdk-docs-navigation":3,"sdk-docs-page:\u002Fgscdump-sdk\u002Fguides\u002Foperate\u002Ferrors-and-retry":112},[4],{"path":5,"title":6,"children":7,"stem":111,"page":16},"\u002Fgscdump-sdk","gscdump SDK",[8,27],{"path":9,"title":10,"children":11,"stem":25,"page":26},"\u002Fgscdump-sdk\u002Fapi","Api",[12,17,21],{"path":13,"title":14,"stem":15,"page":16},"\u002Fgscdump-sdk\u002Fapi\u002Fdirect-client","Direct client exports","api\u002F1.direct-client",true,{"path":18,"title":19,"stem":20,"page":16},"\u002Fgscdump-sdk\u002Fapi\u002Fhosted-http","Hosted HTTP","api\u002F2.hosted-http",{"path":22,"title":23,"stem":24,"page":16},"\u002Fgscdump-sdk\u002Fapi\u002Frealtime","Realtime","api\u002F3.realtime","gscdump-sdk\u002Fapi",false,{"path":28,"title":29,"children":30,"stem":110,"page":26},"\u002Fgscdump-sdk\u002Fguides","Guides",[31,48,73,97],{"path":32,"title":33,"children":34,"stem":47,"page":16},"\u002Fgscdump-sdk\u002Fguides\u002Fstart","Start",[35,39,43],{"path":36,"title":37,"stem":38,"page":16},"\u002Fgscdump-sdk\u002Fguides\u002Fstart\u002Fchoose-access","Choose access","guides\u002F1.start\u002F1.choose-access",{"path":40,"title":41,"stem":42,"page":16},"\u002Fgscdump-sdk\u002Fguides\u002Fstart\u002Fhosted-first-result","Hosted first result","guides\u002F1.start\u002F2.hosted-first-result",{"path":44,"title":45,"stem":46,"page":16},"\u002Fgscdump-sdk\u002Fguides\u002Fstart\u002Fdirect-first-result","Direct first result","guides\u002F1.start\u002F3.direct-first-result","guides\u002F1.start\u002Findex",{"path":49,"title":50,"children":51,"stem":72,"page":16},"\u002Fgscdump-sdk\u002Fguides\u002Fread-data","Read data",[52,56,60,64,68],{"path":53,"title":54,"stem":55,"page":16},"\u002Fgscdump-sdk\u002Fguides\u002Fread-data\u002Fdirect-search-analytics","Direct Search Analytics","guides\u002F2.read-data\u002F1.direct-search-analytics",{"path":57,"title":58,"stem":59,"page":16},"\u002Fgscdump-sdk\u002Fguides\u002Fread-data\u002Fhosted-analytics","Hosted analytics","guides\u002F2.read-data\u002F2.hosted-analytics",{"path":61,"title":62,"stem":63,"page":16},"\u002Fgscdump-sdk\u002Fguides\u002Fread-data\u002Fhosted-indexing","Hosted indexing","guides\u002F2.read-data\u002F3.hosted-indexing",{"path":65,"title":66,"stem":67,"page":16},"\u002Fgscdump-sdk\u002Fguides\u002Fread-data\u002Fhosted-sitemaps","Hosted sitemaps","guides\u002F2.read-data\u002F4.hosted-sitemaps",{"path":69,"title":70,"stem":71,"page":16},"\u002Fgscdump-sdk\u002Fguides\u002Fread-data\u002Fdirect-bing","Direct Bing","guides\u002F2.read-data\u002F5.direct-bing","guides\u002F2.read-data\u002Findex",{"path":74,"title":75,"children":76,"stem":96,"page":16},"\u002Fgscdump-sdk\u002Fguides\u002Fbuild-integrations","Build integrations",[77,81,85,89,92],{"path":78,"title":79,"stem":80,"page":16},"\u002Fgscdump-sdk\u002Fguides\u002Fbuild-integrations\u002Fnuxt","Nuxt","guides\u002F3.build-integrations\u002F1.nuxt",{"path":82,"title":83,"stem":84,"page":16},"\u002Fgscdump-sdk\u002Fguides\u002Fbuild-integrations\u002Fnextjs","Next.js","guides\u002F3.build-integrations\u002F2.nextjs",{"path":86,"title":87,"stem":88,"page":16},"\u002Fgscdump-sdk\u002Fguides\u002Fbuild-integrations\u002Fhono-express","Hono \u002F Express","guides\u002F3.build-integrations\u002F3.hono-express",{"path":90,"title":23,"stem":91,"page":16},"\u002Fgscdump-sdk\u002Fguides\u002Fbuild-integrations\u002Frealtime","guides\u002F3.build-integrations\u002F4.realtime",{"path":93,"title":94,"stem":95,"page":16},"\u002Fgscdump-sdk\u002Fguides\u002Fbuild-integrations\u002Fwebhooks","Webhooks","guides\u002F3.build-integrations\u002F5.webhooks","guides\u002F3.build-integrations\u002Findex",{"path":98,"title":99,"children":100,"stem":109,"page":16},"\u002Fgscdump-sdk\u002Fguides\u002Foperate","Operate",[101,105],{"path":102,"title":103,"stem":104,"page":16},"\u002Fgscdump-sdk\u002Fguides\u002Foperate\u002Fkeys-and-scopes","Keys and scopes","guides\u002F4.operate\u002F1.keys-and-scopes",{"path":106,"title":107,"stem":108,"page":16},"\u002Fgscdump-sdk\u002Fguides\u002Foperate\u002Ferrors-and-retry","Errors and retry","guides\u002F4.operate\u002F2.errors-and-retry","guides\u002F4.operate\u002Findex","gscdump-sdk\u002Fguides","index",{"title":113,"description":114,"body":115,"id":515,"path":106,"stem":108,"extension":516,"navigation":517,"seo":518,"_source":519,"sitemap":520},"Handle hosted API errors and retries","Read typed failures, respect Retry-After, and avoid duplicate mutations.",{"toc":116,"nodes":136,"frontmatter":505,"meta":507},{"links":117,"title":134,"searchDepth":135,"depth":135},[118,122,125,128,131],{"id":119,"text":120,"depth":121},"catch-a-typed-error","Catch a typed error",2,{"id":123,"text":124,"depth":121},"retry-a-safe-request","Retry a safe request",{"id":126,"text":127,"depth":121},"avoid-duplicate-mutations","Avoid duplicate mutations",{"id":129,"text":130,"depth":121},"recover-an-uncertain-result","Recover an uncertain result",{"id":132,"text":133,"depth":121},"report-a-failure","Report a failure","",3,[137,141,145,148,390,393,395,464,480,482,489,491,498,500],[138,139,113],"h1",{"id":140},"handle-hosted-api-errors-and-retries",[142,143,144],"p",{},"Catch a typed error at your server boundary. The SDK validates requests and responses against the v1 contract.",[146,147,120],"h2",{"id":119},[149,150,154],"pre",{"language":151,"class":152,"tabindex":153},"ts","rangi shiki shj-lang-ts",0,[155,156,158,186,187,186,189,186,196,186,224,186,238,186,271,186,278,186,297,186,301,186,313,186,332,186,339,186,341,186,351,186,360,186,370,186,380,186,386],"code",{"class":157},"language-ts",[159,160,163,168,169,174,175,168,178,168,181],"span",{"class":161,"style":162},"line","display: inline",[159,164,167],{"class":165,"style":166},"shj-syn-kwd shj-kwd","--shiki-light:#cf222e;--shiki-default:#cf222e;color:#cf222e;--shiki-dark:#ff7b72","import"," ",[159,170,173],{"class":171,"style":172},"shj-syn-bracket shj-bracket","--shiki-light:#57606a;--shiki-default:#57606a;color:#57606a;--shiki-dark:#8b949e","{"," isGscdumpV1Error ",[159,176,177],{"class":171,"style":172},"}",[159,179,180],{"class":165,"style":166},"from",[159,182,185],{"class":183,"style":184},"shj-syn-str shj-str","--shiki-light:#0a3069;--shiki-default:#0a3069;color:#0a3069;--shiki-dark:#a5d6ff","'@gscdump\u002Fsdk\u002Fv1'","\n",[159,188],{"class":161,"style":162},[159,190,191,168,194],{"class":161,"style":162},[159,192,193],{"class":165,"style":166},"try",[159,195,173],{"class":171,"style":172},[159,197,198,199,202,203,168,207,210,211,214,219,222],{"class":161,"style":162},"  ",[159,200,201],{"class":165,"style":166},"const"," result ",[159,204,206],{"class":205,"style":166},"shj-syn-oper shj-oper","=",[159,208,209],{"class":165,"style":166},"await"," client",[159,212,213],{"class":205,"style":166},".",[159,215,218],{"class":216,"style":217},"shj-syn-func shj-func","--shiki-light:#8250df;--shiki-default:#8250df;color:#8250df;--shiki-dark:#d2a8ff","queryAnalyticsRows",[159,220,221],{"class":171,"style":172},"(",[159,223,173],{"class":171,"style":172},[159,225,226,227,168,230,232,233,235],{"class":161,"style":162},"    params",[159,228,229],{"class":205,"style":166},":",[159,231,173],{"class":171,"style":172}," siteId ",[159,234,177],{"class":171,"style":172},[159,236,237],{"class":205,"style":166},",",[159,239,240,241,168,243,245,246,168,248,251,254,257,259,260,168,262,168,267,269],{"class":161,"style":162},"    body",[159,242,229],{"class":205,"style":166},[159,244,173],{"class":171,"style":172}," dimensions",[159,247,229],{"class":205,"style":166},[159,249,250],{"class":171,"style":172},"[",[159,252,253],{"class":183,"style":184},"'query'",[159,255,256],{"class":171,"style":172},"]",[159,258,237],{"class":205,"style":166}," rowLimit",[159,261,229],{"class":205,"style":166},[159,263,266],{"class":264,"style":265},"shj-syn-num shj-num","--shiki-light:#0550ae;--shiki-default:#0550ae;color:#0550ae;--shiki-dark:#79c0ff","100",[159,268,177],{"class":171,"style":172},[159,270,237],{"class":205,"style":166},[159,272,198,273,275],{"class":161,"style":162},[159,274,177],{"class":171,"style":172},[159,276,277],{"class":171,"style":172},")",[159,279,280,281,283,286,288,289,291,292,294,295],{"class":161,"style":162},"  console",[159,282,213],{"class":205,"style":166},[159,284,285],{"class":216,"style":217},"log",[159,287,221],{"class":171,"style":172},"result",[159,290,213],{"class":205,"style":166},"data",[159,293,213],{"class":205,"style":166},"rows",[159,296,277],{"class":171,"style":172},[159,298,299],{"class":161,"style":162},[159,300,177],{"class":171,"style":172},[159,302,303,168,306,308,309,168,311],{"class":161,"style":162},[159,304,305],{"class":165,"style":166},"catch",[159,307,221],{"class":171,"style":172},"error",[159,310,277],{"class":171,"style":172},[159,312,173],{"class":171,"style":172},[159,314,198,315,168,318,320,323,326,308,328,330],{"class":161,"style":162},[159,316,317],{"class":165,"style":166},"if",[159,319,221],{"class":171,"style":172},[159,321,322],{"class":205,"style":166},"!",[159,324,325],{"class":216,"style":217},"isGscdumpV1Error",[159,327,221],{"class":171,"style":172},[159,329,277],{"class":171,"style":172},[159,331,277],{"class":171,"style":172},[159,333,334,335,338],{"class":161,"style":162},"    ",[159,336,337],{"class":165,"style":166},"throw"," error",[159,340],{"class":161,"style":162},[159,342,280,343,345,347,349],{"class":161,"style":162},[159,344,213],{"class":205,"style":166},[159,346,308],{"class":216,"style":217},[159,348,221],{"class":171,"style":172},[159,350,173],{"class":171,"style":172},[159,352,353,354,338,356,155,358],{"class":161,"style":162},"    code",[159,355,229],{"class":205,"style":166},[159,357,213],{"class":205,"style":166},[159,359,237],{"class":205,"style":166},[159,361,362,363,338,365,367,368],{"class":161,"style":162},"    requestId",[159,364,229],{"class":205,"style":166},[159,366,213],{"class":205,"style":166},"requestId",[159,369,237],{"class":205,"style":166},[159,371,372,373,338,375,377,378],{"class":161,"style":162},"    retryable",[159,374,229],{"class":205,"style":166},[159,376,213],{"class":205,"style":166},"retryable",[159,379,237],{"class":205,"style":166},[159,381,198,382,384],{"class":161,"style":162},[159,383,177],{"class":171,"style":172},[159,385,277],{"class":171,"style":172},[159,387,388],{"class":161,"style":162},[159,389,177],{"class":171,"style":172},[142,391,392],{},"The error also carries a message and details. Log the request ID and code. Keep credentials and request headers out of logs.",[146,394,124],{"id":123},[396,397,398,411],"table",{"tabindex":153},[399,400,401],"thead",{},[402,403,404,408],"tr",{},[405,406,407],"th",{},"Condition",[405,409,410],{},"Action",[412,413,414,428,442,456],"tbody",{},[402,415,416,422],{},[417,418,419],"td",{},[155,420,421],{},"429 rate_limited",[417,423,424,425,213],{},"Wait for ",[155,426,427],{},"Retry-After",[402,429,430,436],{},[417,431,432,433],{},"Retryable ",[155,434,435],{},"503",[417,437,438,439,441],{},"Follow ",[155,440,427],{}," when present.",[402,443,444,453],{},[417,445,446,449,450],{},[155,447,448],{},"401"," or ",[155,451,452],{},"403",[417,454,455],{},"Check the key, scope, and Site access.",[402,457,458,461],{},[417,459,460],{},"Empty successful rows",[417,462,463],{},"Check filters and coverage, do not retry blindly.",[142,465,466,467,470,471,473,474,479],{},"The SDK retries operations marked ",[155,468,469],{},"idempotent"," by default, up to three total attempts. It caps configuration at five. It honors ",[155,472,427],{}," when a retry is allowed. Check the ",[475,476,478],"a",{"href":477},"\u002Fgscdump-sdk\u002Fapi\u002Fhosted-http#rate-limits","hosted HTTP reference"," for the current rule.",[146,481,127],{"id":126},[142,483,484,485,488],{},"The SDK does not automatically retry non-idempotent operations such as new URL inspections, partner user key creation, and realtime ticket creation. A timeout after sending one leaves its outcome uncertain. A client-supplied ",[155,486,487],{},"Idempotency-Key"," has no public result-replay contract.",[146,490,130],{"id":129},[142,492,493,494,497],{},"Read authoritative state before resending a mutation. For an inspection, check saved ",[475,495,496],{"href":61},"Indexing Evidence",". A realtime reconnect always requests a new single-use ticket.",[146,499,133],{"id":132},[142,501,502,503,213],{},"Record the operation, Site ID, error code, and request ID. Do not record the API key. For access failures, follow ",[475,504,103],{"href":102},{"title":113,"navigation":506,"description":114},{"title":107},{"title":113,"description":144,"toc":508},{"title":134,"searchDepth":135,"depth":135,"links":509},[510,511,512,513,514],{"id":119,"depth":121,"text":120},{"id":123,"depth":121,"text":124},{"id":126,"depth":121,"text":127},{"id":129,"depth":121,"text":130},{"id":132,"depth":121,"text":133},"sdkDocs\u002Fguides\u002F4.operate\u002F2.errors-and-retry.md","md",{"title":107},{"title":113,"description":114},"\u002Fopt\u002Factions-runner\u002F_work\u002Fgscdump.com\u002Fgscdump.com\u002Fnode_modules\u002F.cache\u002Fcomark-content\u002Fgit\u002Fd100867c457f148bef5f\u002Fdocs\u002Fgscdump-sdk\u002Fguides\u002F4.operate\u002F2.errors-and-retry.md",{"loc":106},1794983848644]