• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

h4kuna / ares / 36124614524

25 Sep 2026 10:25AM UTC coverage: 87.852% (-3.8%) from 91.684%
36124614524

push

github

h4kuna
chore: rename default branch to main

405 of 461 relevant lines covered (87.85%)

0.88 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Exception/ServerResponseException.php
1
<?php declare(strict_types = 1);
2

3
namespace h4kuna\Ares\Exception;
4

5
use Throwable;
6

7
final class ServerResponseException extends RuntimeException
8
{
9

10
        /**
11
         * @param string $message
12
         */
13
        public function __construct(
14
                $message = 'The service is probably overloaded. Repeat request after a few minutes.',
15
                int $code = 0,
16
                ?Throwable $previous = null,
17
        )
18
        {
19
                $this->code = $code;
×
20
                parent::__construct($message, $previous);
×
21
        }
22

23
        public static function brokenXml(): self
24
        {
25
                return self::badResponse('Broken response xml response.');
×
26
        }
27

28
        public static function badResponse(
29
                string $statusText,
30
                int $statusCode = 0,
31
        ): self
32
        {
33
                return new self($statusText, $statusCode);
×
34
        }
35

36
        public static function fromException(Throwable $exception): self
37
        {
38
                return new self($exception->getMessage(), $exception->getCode(), $exception);
×
39
        }
40

41
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc