PageSourceSearch

https://inlightbeauty.co.uk/cdn/shopifycloud/checkout-web/assets/c1/shared-report-graphql-error.BIbaQJ6B.js

js inlightbeauty.co.uk collected 2026-09-28 23:57:25 UTC 5,279 bytes, 1 lines download raw bytes

1import{H as i,I as h,J as d,L as g,M as l}from"./esnext-vendor.DDpcaSqU.js";import{U as q}from"./shop-pay-experiments.BdHRV-Vf.js";const f=[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],m=[/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 S(e,a){const{observability:t,fileContext:_,queryName:r,documentId:n,requestId:o}=a,s=N(e);s.actionable?E(e,t,_,r,{documentId:n,requestId:o}):L(e,t,_,s,r,n,o)}function N(e){if(!(e instanceof Error))return{actionable:!1,reason:"invalid_error_class"};if(e instanceof i)return{actionable:!1,reason:"unsupported_content_type"};if(e instanceof h)return{actionable:!1,reason:"json_parse_error"};if(e instanceof Error&&m.some(r=>r.test(e.message)))return{actionable:!1,reason:"json_parse_error"};if(e.name==="GraphQLExecutionError"&&q.some(r=>r.test(e.message)))return{actionable:!1,reason:"denylisted_graphql_execution_error"};if(e instanceof d&&e.groupingHash==="graphql_parsing_error"||e.name==="FoundationGraphQL::Exception::Proposal")return{actionable:!1,reason:"graphql_parsing_error"};if(e instanceof g||e instanceof l&&e.response.status>=500)return{actionable:!1,reason:"network_error"};if(e instanceof l){const{response:r}=e,n=r.headers.get("x-request-id")??void 0,o=r.status;if(o===401)return{actionable:!1,reason:"denylisted_graphql_execution_error"};if(o===415)return{actionable:!1,reason:"bot_traffic"};if(o===405)return{actionable:!1,reason:"graphql_method_not_allowed"};if(o===429||o===430)return{actionable:!1,reason:"graphql_throttle_engaged"};if(n&&o===404)return{actionable:!1,reason:"graphql_not_found"};if(!n&&f.includes(o))return{actionable:!1,reason:"noise_from_external_sources"}}return{actionable:!0}}function E(e,a,t,_,r={}){if(e instanceof l){const{response:n}=e,o=n.headers.get("x-request-id")??void 0,s=n.headers.get("cf-ray")??void 0,{name:u,groupingHash:c}=e;a.error(e,{errorClass:u,groupingHash:c,severity:"error",metadata:{graphQL:{name:_,requestId:o,rayId:s,...r.documentId!=null&&{documentId:r.documentId}}}})}else{const n=e instanceof d?e.groupingHash:void 0;a.error(e,{errorClass:`${t}::Exception::${_}`,...n!=null&&{groupingHash:n},severity:"error",metadata:{graphQL:{name:_,...r.documentId!=null&&{documentId:r.documentId},...r.requestId!=null&&{requestId:r.requestId}}}})}}function L(e,a,t,_,r,n,o){let s=o,u,c;if(e instanceof l){const{response:p}=e;s=p.headers.get("x-request-id")??o,u=p.status}else e instanceof i&&(c=e.contentType);switch(_.reason){case"network_error":a.log("report_graphql_error_non_actionable_error_detected",`GraphQL fetch failed due to network error query_name=${r}`,{errorName:e.name,errorMessage:e.message}),a.leaveErrorBreadcrumb(`Network failure on ${t}:Query::${r}`,{name:r,error:JSON.stringify(e)});break;case"graphql_method_not_allowed":a.log("report_graphql_error_non_actionable_error_detected","GraphQL request received using an unsupported method.",{queryName:r,fileContext:t,status:u}),a.counter({name:"graphql_method_not_allowed",value:1,attributes:{status:u,queryName:r,fileContext:t}});break;case"graphql_throttle_engaged":a.log("report_graphql_error_non_actionable_error_detected","GraphQL request was rate limited.",{queryName:r,fileContext:t,status:u}),a.counter({name:"graphql_throttle_engaged",value:1,attributes:{status:u,queryName:r,fileContext:t}});break;case"graphql_not_found":a.log("report_graphql_error_non_actionable_error_detected","GraphQL request failed to locate the expected resource",{queryName:r,fileContext:t,status:u,requestId:s,...n!=null&&{documentId:n}}),a.counter({name:"graphql_not_found",value:1,attributes:{status:u}});break;case"noise_from_external_sources":a.log("report_graphql_error_non_actionable_error_detected",`Client received a ${u} status code from external sources.`,{queryName:r,requestId:s,fileContext:t}),a.counter({name:"graphql_noise_from_external_sources",value:1,attributes:{status:u,queryName:r,fileContext:t}});break;
1case"invalid_error_class":case"denylisted_graphql_execution_error":a.counter({name:"graphql_denylisted_execution_error",value:1,attributes:{queryName:r}});break;case"graphql_parsing_error":a.log("report_graphql_error_non_actionable_error_detected","GraphQL request failed to parse the requested document",{queryName:r,fileContext:t,...n!=null&&{documentId:n},...s!=null&&{requestId:s}}),a.counter({name:"graphql_parsing_error",value:1,attributes:{queryName:r,fileContext:t}});break;case"bot_traffic":break;case"unsupported_content_type":a.log("report_graphql_error_non_actionable_error_detected","GraphQL request received a response with an unsupported content type",{requestId:s,queryName:r,fileContext:t,contentType:c}),a.counter({name:"graphql_unsupported_content_type",value:1,attributes:{queryName:r,fileContext:t,contentType:c}});break;case"json_parse_error":a.log("report_graphql_error_non_actionable_error_detected","GraphQL response body was not valid JSON",{queryName:r,fileContext:t,errorMessage:e.message}),a.counter({name:"graphql_json_parse_error",value:1,attributes:{queryName:r,fileContext:t}});break;default:Q(_.reason)}}function Q(e){return null}export{N as d,S 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.