Skip to content

Commit 15428f0

Browse files
authored
Update http-client.md
1 parent e502921 commit 15428f0

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

http-client.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
git: 65a9f2e285fad310d2a3de756877b375232ff9fc
2+
git: 519c46b94461471dcb4bf2f4692e4edb481b808c
33
---
44

55
# HTTP-клиент
@@ -323,6 +323,16 @@ $response = Http::withHeaders([
323323
// ...
324324
})->json();
325325

326+
По умолчанию сообщения `RequestException` усекаются до 120 символов при логировании или в сообщении об ошибке. Чтобы настроить или отключить это поведение, вы можете использовать методы `truncateRequestExceptionsAt` и `dontTruncateRequestExceptions` при настройке поведения обработки исключений вашего приложения в файле `bootstrap/app.php`:
327+
328+
->withExceptions(function (Exceptions $exceptions) {
329+
// Truncate request exception messages to 240 characters...
330+
$exceptions->truncateRequestExceptionsAt(240);
331+
332+
// Disable request exception message truncation...
333+
$exceptions->dontTruncateRequestExceptions();
334+
})
335+
326336
<a name="guzzle-middleware"></a>
327337
### Guzzle Middleware
328338

0 commit comments

Comments
 (0)