You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
catch(error){if(errorinstanceofDOMException&&error.name==='AbortError')throwfail('aborted','Facet request was aborted.');throwfail('network','Coverage summary could not connect to the V2 service.');}
20
25
if(!response.ok)throwfail(response.status>=500 ? 'unavailable' : response.status===429 ? 'rate-limited' : 'http',`Coverage summary request failed with status ${response.status}.`);
try{payload=awaitresponse.json();}catch{throwfail('invalid-contract','Coverage summary response was not valid JSON.');}
28
+
constparsed=responseSchema.safeParse(payload);
22
29
if(!parsed.success)throwfail('invalid-contract','Coverage summary response was rejected safely.');
23
30
if(parsed.data.meta.profile!==profile||parsed.data.meta.release_id!==expected.releaseId||parsed.data.meta.ruleset_version!==expected.ruleset)throwfail('invalid-contract','Coverage summary belongs to a different profile or promoted release.');
if(normalizedFilter(filters[key])!==normalizedFilter(responseFilters[key]))throwfail('invalid-contract','Coverage summary belongs to a different filter scope.');
0 commit comments