Skip to content

Commit

Permalink
Remove token from report.
Browse files Browse the repository at this point in the history
  • Loading branch information
h4kuna committed Oct 30, 2023
1 parent 5dddb7a commit a427ec9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Utils/Queue.php
Expand Up @@ -4,10 +4,10 @@

use h4kuna\Dir\TempDir;
use h4kuna\Fio\Exceptions;
use h4kuna\Fio\FioRead;
use h4kuna\Fio\Pay\Response;
use h4kuna\Fio\Pay\XMLResponse;
use Nette\SafeStream;
use Nette\Utils\Strings;
use Psr\Http\Client\ClientExceptionInterface;
use Psr\Http\Client\ClientInterface;
use Psr\Http\Message\RequestInterface;
Expand Down Expand Up @@ -103,7 +103,8 @@ private function request(string $token, RequestInterface $request): ResponseInte

return $response;
} catch (ClientExceptionInterface $e) {
throw new Exceptions\ServiceUnavailable($e->getMessage(), $e->getCode(), $e);
$message = str_replace($token, Strings::truncate($token, 10), $e->getMessage());
throw new Exceptions\ServiceUnavailable($message, $e->getCode(), $e);
} finally {
fclose($file);
}
Expand Down

0 comments on commit a427ec9

Please sign in to comment.