Skip to content

Commit

Permalink
Merge pull request #658 from codeforequity-at/develop
Browse files Browse the repository at this point in the history
Botium Core 1.11.16
  • Loading branch information
Botium authored Nov 18, 2021
2 parents 19a2334 + 8d153b9 commit 33f1da7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "botium-core",
"version": "1.11.15",
"version": "1.11.16",
"description": "The Selenium for Chatbots",
"main": "index.js",
"module": "dist/botium-es.js",
Expand Down
14 changes: 13 additions & 1 deletion src/containers/plugins/SimpleRestContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,9 @@ module.exports = class SimpleRestContainer {
} else {
if (response.statusCode >= 400) {
debug(`got error response: ${response.statusCode}/${response.statusMessage}`)
if (debug.enabled && body) {
debug(botiumUtils.shortenJsonString(body))
}
return reject(new Error(`got error response: ${response.statusCode}/${response.statusMessage}`))
}

Expand Down Expand Up @@ -516,9 +519,15 @@ module.exports = class SimpleRestContainer {
await timeout(pingConfig.timeout)
} else if (response.statusCode >= 400) {
debug(`_waitForUrlResponse on url check ${pingConfig.uri} got error response: ${response.statusCode}/${response.statusMessage}`)
if (debug.enabled && body) {
debug(botiumUtils.shortenJsonString(body))
}
await timeout(pingConfig.timeout)
} else {
debug(`_waitForUrlResponse success on url check ${pingConfig.uri}`)
debug(`_waitForUrlResponse success on url check ${pingConfig.uri}: ${response.statusCode}/${response.statusMessage}`)
if (debug.enabled && body) {
debug(botiumUtils.shortenJsonString(body))
}
return body
}
}
Expand Down Expand Up @@ -712,6 +721,9 @@ module.exports = class SimpleRestContainer {
} else {
if (response.statusCode >= 400) {
debug(`_runPolling: got error response: ${response.statusCode}/${response.statusMessage}, request: ${JSON.stringify(pollConfig)}`)
if (debug.enabled && body) {
debug(botiumUtils.shortenJsonString(body))
}
} else if (body) {
debug(`_runPolling: got response code: ${response.statusCode}, body: ${botiumUtils.shortenJsonString(body)}`)

Expand Down

0 comments on commit 33f1da7

Please sign in to comment.