diff --git a/lib/OpenQA/Worker/WebUIConnection.pm b/lib/OpenQA/Worker/WebUIConnection.pm index 137e14728b5..81687e9c5c1 100644 --- a/lib/OpenQA/Worker/WebUIConnection.pm +++ b/lib/OpenQA/Worker/WebUIConnection.pm @@ -157,6 +157,11 @@ sub _setup_websocket_connection ($self, $websocket_url = undef) { my $error = $tx->error; my $error_message = "Unable to upgrade to ws connection via $websocket_url"; + + if ($tx->res->error && $tx->res->error->{message}) { + $error_message .= sprintf(", %s in %s", $tx->res->error->{message}, $tx->req->url); + } + $error_message .= ", code $error->{code}" if ($error && $error->{code}); $self->_set_status(failed => {error_message => $error_message}); return undef;