update
This commit is contained in:
@@ -1870,9 +1870,15 @@ class DokterController extends Controller
|
||||
'accnumber' => $nofoto,
|
||||
'register_no' => $noregister,
|
||||
]);
|
||||
|
||||
$body = $response->json();
|
||||
$errorMessage = $body['message'] ?? 'Unknown Error';
|
||||
$details = json_decode($errorMessage, true);
|
||||
if (json_last_error() === JSON_ERROR_NONE && isset($details['message'])) {
|
||||
$pesan = $details['message'];
|
||||
} else {
|
||||
$pesan = $errorMessage;
|
||||
}
|
||||
if ($response->successful()) {
|
||||
|
||||
Log::info('requestResult.', [
|
||||
'status' => $response->status(),
|
||||
'message' => $response->json()
|
||||
|
||||
Reference in New Issue
Block a user