Skip to content

Commit 9fe0e0b

Browse files
author
Marco Boretto
committed
Add guzzle full response message
1 parent 55dd714 commit 9fe0e0b

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/Request.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ public static function execute($action, array $data = null)
206206
$request_params
207207
);
208208
} catch (RequestException $e) {
209-
throw new TelegramException($e->getMessage());
209+
//throw new TelegramException($e->getMessage());
210+
throw new TelegramException($e->getResponse()->getBody()->getContents());
210211
} finally {
211212
//Logging verbose debug output
212213
TelegramLog::endDebugLogTempStream("Verbose HTTP Request output:\n%s\n");
@@ -249,7 +250,8 @@ public static function downloadFile(File $file)
249250
['debug' => $debug_handle, 'sink' => $loc_path]
250251
);
251252
} catch (RequestException $e) {
252-
throw new TelegramException($e->getMessage());
253+
//throw new TelegramException($e->getMessage());
254+
throw new TelegramException($e->getResponse()->getBody()->getContents());
253255
} finally {
254256
//Logging verbose debug output
255257
TelegramLog::endDebugLogTempStream("Verbose HTTP File Download Request output:\n%s\n");

0 commit comments

Comments
 (0)