PageSourceSearch

https://complexity.gg/cdn/shopifycloud/checkout-web/assets/c1/b8733b27.B0VmlfYu.js

js complexity.gg collected 2026-10-02 10:54:13 UTC 5,228 bytes, 1 lines download raw bytes

1import{I as e,J as r,L as t,M as a,O as o}from"./2c1ab0fe.GMbxnz74.js";import{bu as n}from"./4c290a1e.C6TDJ9Fn.js";const s=[0,400,402,403,404,406,407,408,409,410,411,412,413,414,416,417,418,421,422,423,424,426,428,431,451],i=[/Failed to execute 'json' on 'Response'/i,/JSON\.parse:/i,/JSON Parse error:/i,/The string did not match the expected pattern/i,/not valid JSON/i,/in JSON at position/i,/Unexpected end of (JSON )?input/i];function u(r,a){const{observability:n,fileContext:s,queryName:i,documentId:u,requestId:_}=a,c=l(r);c.actionable?function(e,r,a,n,s={}){if(e instanceof o){const{response:t}=e,a=t.headers.get("x-request-id")??void 0,o=t.headers.get("cf-ray")??void 0,{name:i,groupingHash:u}=e;r.error(e,{errorClass:i,groupingHash:u,severity:"error",metadata:{graphQL:{name:n,requestId:a,rayId:o,...null!=s.documentId&&{documentId:s.documentId}}}})}else{const o=e instanceof t?e.groupingHash:void 0;r.error(e,{errorClass:`${a}::Exception::${n}`,...null!=o&&{groupingHash:o},severity:"error",metadata:{graphQL:{name:n,...null!=s.documentId&&{documentId:s.documentId},...null!=s.requestId&&{requestId:s.requestId}}}})}}(r,n,s,i,{documentId:u,requestId:_}):function(r,t,a,n,s,i,u){let l,_,c=u;if(r instanceof o){const{response:e}=r;c=e.headers.get("x-request-id")??u,l=e.status}else r instanceof e&&(_=r.contentType);switch(n.reason){case"network_error":t.log("report_graphql_error_non_actionable_error_detected",`GraphQL fetch failed due to network error query_name=${s}`,{errorName:r.name,errorMessage:r.message}),t.leaveErrorBreadcrumb(`Network failure on ${a}:Query::${s}`,{name:s,error:JSON.stringify(r)});break;case"graphql_method_not_allowed":t.log("report_graphql_error_non_actionable_error_detected","GraphQL request received using an unsupported method.",{queryName:s,fileContext:a,status:l}),t.counter({name:"graphql_method_not_allowed",value:1,attributes:{status:l,queryName:s,fileContext:a}});break;case"graphql_throttle_engaged":t.log("report_graphql_error_non_actionable_error_detected","GraphQL request was rate limited.",{queryName:s,fileContext:a,status:l}),t.counter({name:"graphql_throttle_engaged",value:1,attributes:{status:l,queryName:s,fileContext:a}});break;case"graphql_not_found":t.log("report_graphql_error_non_actionable_error_detected","GraphQL request failed to locate the expected resource",{queryName:s,fileContext:a,status:l,requestId:c,...null!=i&&{documentId:i}}),t.counter({name:"graphql_not_found",value:1,attributes:{status:l}});break;case"noise_from_external_sources":t.log("report_graphql_error_non_actionable_error_detected",`Client received a ${l} status code from external sources.`,{queryName:s,requestId:c,fileContext:a}),t.counter({name:"graphql_noise_from_external_sources",value:1,attributes:{status:l,queryName:s,fileContext:a}});break;case"invalid_error_class":case"denylisted_graphql_execution_error":t.counter({name:"graphql_denylisted_execution_error",value:1,attributes:{queryName:s}});break;case"graphql_parsing_error":t.log("report_graphql_error_non_actionable_error_detected","GraphQL request failed to parse the requested document",{queryName:s,fileContext:a,...null!=i&&{documentId:i},...null!=c&&{requestId:c}}),t.counter({name:"graphql_parsing_error",value:1,attributes:{queryName:s,fileContext:a}});break;case"bot_traffic":break;case"unsupported_content_type":t.log("report_graphql_error_non_actionable_error_detected","GraphQL request received a response with an unsupported content type",{requestId:c,queryName:s,fileContext:a,contentType:_}),t.counter({name:"graphql_unsupported_content_type",value:1,attributes:{queryName:s,fileContext:a,contentType:_}});break;case"json_parse_error":t.log("report_graphql_error_non_actionable_error_detected","GraphQL response body was not valid JSON",{queryName:s,fileContext:a,errorMessage:r.message}),t.counter({name:"graphql_json_parse_error",value:1,attributes:{queryName:s,fileContext:a}});break;default:n.reason}}(r,n,s,c,i,u,_)}function l(u){if(!(u instanceof Error))return{actionable:!1,reason:"invalid_error_class"};if(u instanceof e)return{actionable:!1,reason:"unsupported_content_type"};if(u instanceof r)return{actionable:!1,reason:"json_parse_error"};if(u instanceof Error&&i.some(e=>e.test(u.message)))return{actionable:!1,reason:"json_parse_error"};if("GraphQLExecutionError"===u.name&&n.some(e=>e.test(u.message)))return{actionable:!1,reason:"denylisted_graphql_execution_error"};if(u instanceof t&&"graphql_parsing_error"===u.groupingHash||"FoundationGraphQL::Exception::Proposal"===u.name)return{actionable:!1,reason:"graphql_parsing_error"};if(u instanceof a||u instanceof o&&u.response.status>=500)return{actionable:!1,reason:"network_error"};if(u instanceof o){const{response:e}=u,r=e.headers.get("x-request-id")??void 0,t=e.status;if(401===t)return{actionable:!1,reason:"denylisted_graphql_execution_error"};if(415===t)return{actionable:!1,reason:"bot_traffic"};
1if(405===t)return{actionable:!1,reason:"graphql_method_not_allowed"};if(429===t||430===t)return{actionable:!1,reason:"graphql_throttle_engaged"};if(r&&404===t)return{actionable:!1,reason:"graphql_not_found"};if(!r&&s.includes(t))return{actionable:!1,reason:"noise_from_external_sources"}}return{actionable:!0}}export{l as d,u as r};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.