diff --git a/src/core/config/OperationConfig.js b/src/core/config/OperationConfig.js index a22bc9e2..0d6778fc 100755 --- a/src/core/config/OperationConfig.js +++ b/src/core/config/OperationConfig.js @@ -3407,7 +3407,7 @@ const OperationConfig = { "

", "You can add headers line by line in the format Key: Value", "

", - "This operation will throw an error for any status code that is not 200, unless the 'Ignore status code' option is checked.", + "The status code of the response, along with a limited selection of exposed headers, can be viewed by checking the 'Show response metadata' option. Only a limited set of response headers are exposed by the browser for security reasons.", ].join("\n"), run: HTTP.runHTTPRequest, inputType: "string", diff --git a/src/core/operations/HTTP.js b/src/core/operations/HTTP.js index fd90f455..c02c3628 100755 --- a/src/core/operations/HTTP.js +++ b/src/core/operations/HTTP.js @@ -126,6 +126,10 @@ const HTTP = { return fetch(url, config) .then(r => { + if (r.status === 0 && r.type === "opaque") { + return "Error: Null response. Try setting the connection mode to CORS."; + } + if (showResponseMetadata) { let headers = ""; for (let pair of r.headers.entries()) {