File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -163,9 +163,7 @@ private void HandleResponse(string message)
163
163
// Validate the deserialised response object
164
164
if ( response == null || string . IsNullOrEmpty ( response . responseFor ) || string . IsNullOrEmpty ( response . requestId ) )
165
165
{
166
- string responseError = "Response from browser is incorrect. Check game bridge file." ;
167
- PassportLogger . Error ( responseError ) ;
168
- throw new PassportException ( responseError ) ;
166
+ throw new PassportException ( "Response from browser is incorrect. Check game bridge file." ) ;
169
167
}
170
168
171
169
string logMessage = $ "{ TAG } Response for: { response . responseFor } (request ID: { response . requestId } ) : { message } ";
Original file line number Diff line number Diff line change @@ -533,7 +533,7 @@ public async UniTask<string> GetLogoutUrl()
533
533
{
534
534
string response = await communicationsManager . Call ( PassportFunction . LOGOUT ) ;
535
535
string logoutUrl = response . GetStringResult ( ) ;
536
- if ( String . IsNullOrEmpty ( logoutUrl ) )
536
+ if ( string . IsNullOrEmpty ( logoutUrl ) )
537
537
{
538
538
throw new PassportException ( "Failed to get logout URL" , PassportErrorType . AUTHENTICATION_ERROR ) ;
539
539
}
Original file line number Diff line number Diff line change 9
9
using Immutable . Browser . Core ;
10
10
using UnityEngine ;
11
11
using Immutable . Passport . Helpers ;
12
+ using UnityEngine . TestTools ;
12
13
13
14
namespace Immutable . Passport
14
15
{
@@ -1072,6 +1073,7 @@ public async Task Logout_FailedGetLogoutUrl()
1072
1073
e = ex ;
1073
1074
}
1074
1075
1076
+ LogAssert . Expect ( LogType . Error , "[Immutable] [Passport Implementation] Failed to log out: Response is invalid!" ) ;
1075
1077
Assert . NotNull ( e ) ;
1076
1078
1077
1079
Assert . AreEqual ( 0 , urlsOpened . Count ) ;
@@ -1103,6 +1105,7 @@ public async Task Logout_EmptyGetLogoutUrl()
1103
1105
e = ex ;
1104
1106
}
1105
1107
1108
+ LogAssert . Expect ( LogType . Error , "[Immutable] [Passport Implementation] Failed to log out: Failed to get logout URL" ) ;
1106
1109
Assert . NotNull ( e ) ;
1107
1110
1108
1111
Assert . AreEqual ( 0 , urlsOpened . Count ) ;
You can’t perform that action at this time.
0 commit comments