Skip to content

Commit

Permalink
Merge pull request #791 from wazo-platform/fix-test-404-error-undefined
Browse files Browse the repository at this point in the history
tests: fix undefined variable upon failed status code

Reviewed-by: wazo-community-zuul[bot]
  • Loading branch information
wazo-community-zuul[bot] authored Jan 10, 2025
2 parents 464d410 + e767f3f commit 2c0e041
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/src/404.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ const checkUrl = async (browser, url, fromUrl) => {
.then(response => {
result = response.ok;
if (!response.ok) {
message = `Error in ${url} (from ${fromUrl}): status code ${error.response.status}`;
message = `Error in ${url} (from ${fromUrl}): status code ${response.status}`;
console.error(message);
errorUrl.push(message);
}
})
.catch(error => {
const message = `Error in ${url} (from ${fromUrl}): ${error}`;
const message = `Error in ${url} (from ${fromUrl}): ${error.cause}`;
console.error(message);
errorUrl.push(message);
});
Expand Down

0 comments on commit 2c0e041

Please sign in to comment.