From 6bf2e1652ae4511b44d1b7481e04409045214b47 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Tue, 1 Aug 2017 11:20:47 -0700 Subject: [PATCH] Better support for reading files with Response tag --- app/network/network.js | 2 +- app/templating/extensions/response-extension.js | 2 +- app/ui/components/tags/status-tag.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/network/network.js b/app/network/network.js index a50f934e1..84fc57de2 100644 --- a/app/network/network.js +++ b/app/network/network.js @@ -504,7 +504,7 @@ export function _actuallySend ( // Collect various things const result = lastCurlHeadersObject && lastCurlHeadersObject.result; - const statusCode = result ? result.code : 0; + const statusCode = result ? result.code : -1; const statusMessage = result ? result.reason : 'Unknown'; // Collect the headers diff --git a/app/templating/extensions/response-extension.js b/app/templating/extensions/response-extension.js index 537251aec..a0017b9ef 100644 --- a/app/templating/extensions/response-extension.js +++ b/app/templating/extensions/response-extension.js @@ -57,7 +57,7 @@ export default { throw new Error('No responses for request'); } - if (!response.statusCode || response.statusCode < 100) { + if (!response.statusCode) { throw new Error('No responses for request'); } diff --git a/app/ui/components/tags/status-tag.js b/app/ui/components/tags/status-tag.js index a27272efe..e2b08e581 100644 --- a/app/ui/components/tags/status-tag.js +++ b/app/ui/components/tags/status-tag.js @@ -38,7 +38,7 @@ class StatusTag extends PureComponent { statusCodeToDisplay = ''; break; default: - colorClass = 'bg-danger'; + colorClass = 'bg-surprise'; genericStatusMessage = 'UNKNOWN'; statusCodeToDisplay = ''; break;