MCPcopy Create free account
hub / github.com/angular/dev-infra / buildAbort

Function buildAbort

github-actions/browserstack/set-browserstack-env.js:13131–13154  ·  view source on GitHub ↗
(acRef)

Source from the content-addressed store, hash-verified

13129 throw new TypeError("Invalid statusText");
13130 }
13131 }
13132 if ("status" in init && init.status != null) {
13133 response[kState].status = init.status;
13134 }
13135 if ("statusText" in init && init.statusText != null) {
13136 response[kState].statusText = init.statusText;
13137 }
13138 if ("headers" in init && init.headers != null) {
13139 fill(response[kHeaders], init.headers);
13140 }
13141 if (body) {
13142 if (nullBodyStatus.includes(response.status)) {
13143 throw webidl.errors.exception({
13144 header: "Response constructor",
13145 message: `Invalid response status code ${response.status}`
13146 });
13147 }
13148 response[kState].body = body.body;
13149 if (body.type != null && !response[kState].headersList.contains("content-type", true)) {
13150 response[kState].headersList.append("content-type", body.type, true);
13151 }
13152 }
13153 }
13154 function fromInnerResponse(innerResponse, guard) {
13155 var _a;
13156 const response = new Response(kConstruct);
13157 response[kState] = innerResponse;

Callers 2

constructorMethod · 0.70
cloneMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected