Skip to content

Commit 136a4df

Browse files
committed
add more detailed error and updated test
1 parent 7675f4f commit 136a4df

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/MsGraph.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public function connect(?string $id = null): Redirector|RedirectResponse
124124

125125
$errorMessage = "{$response['error']} {$response['error_description']}\n".
126126
'Error Code: '.($response['error_codes'][0] ?? 'N/A')."\n".
127-
"More Info: {$response['error_uri']}";
127+
'More Info: '.($response['error_uri'] ?? 'N/A');
128128

129129
throw new Exception($errorMessage);
130130
}

tests/MsGraphTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969

7070
MsGraphFacade::connect();
7171

72-
})->throws(IdentityProviderException::class);
72+
})->throws(Exception::class);
7373

7474
test('can connect with valid code', function () {
7575

0 commit comments

Comments
 (0)