Commit 8f5f29e9 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

added message when host couldn't be found

parent a0478b28
......@@ -177,7 +177,7 @@ class RequestFetcher extends Command
private function parseResponse($ch)
{
$errorNumber = curl_errno($ch);
if ($errorNumber === CURLE_ABORTED_BY_CALLBACK) {
if ($errorNumber) {
return [
"error" => $errorNumber,
"message" => curl_error($ch),
......
......@@ -182,6 +182,8 @@ class ProxyController extends Controller
"validuntil" => $postData["valid-until"],
"password" => $postData["password"]
]), 413);
}else if($answer["error"] === CURLE_COULDNT_RESOLVE_HOST){
return view('curl_errors.6', ["answer" => $answer]);
}
}
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Unknown Host</title>
<style>
body > div:nth-child(1) {
max-width: 700px;
}
body {
display: flex;
justify-content: center;
padding-top: 30vh;
}
body > div > a {
border: 1px solid #fbcd79;
max-width: 200px;
padding: 4px 8px;
text-align: center;
color: inherit;
text-decoration: none;
border-radius: 5px;
background-color: orange;
color: white;
}
</style>
</head>
<body>
<div>
<p>{{$answer["message"]}}</p>
</div>
</body>
</html>
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment